T
T
theSever2018-03-14 21:39:10
Qt
theSever, 2018-03-14 21:39:10

Qt C++ qtableWidget how to disable column highlighting and replace with sorting when heading is clicked?

Hello. I'm trying to learn C++ and Qt.
There is a qtableWidget table, when you click on the column header, it is selected, how to disable the selection and call the void event with the index of the clicked column for sorting?
PS
How to make selection prohibition understood, but how to pass the column index?
Future generations in search.

// Запрет выделения столбца и выделение всей строки
    ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
    
    // Запрет массового выделения
    ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question