Double click a column for selecting it

Since the mouse release triggers the sorting, we were unable to select
only one column. Connecting the double click over the header to a column
selection, we are able to select that column. However, we cannot select
one column without sorting by it, since the sorting is triggered before,
on the first mouse click.

See issue #1717
This commit is contained in:
mgrojo
2019-01-26 21:11:49 +01:00
parent 03e75af3f1
commit 8162c96c15

View File

@@ -442,6 +442,7 @@ void MainWindow::init()
// Connect some more signals and slots
connect(ui->dataTable->filterHeader(), SIGNAL(sectionClicked(int)), this, SLOT(browseTableHeaderClicked(int)));
connect(ui->dataTable->filterHeader(), &QHeaderView::sectionDoubleClicked, ui->dataTable, &QTableView::selectColumn);
connect(ui->dataTable->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setRecordsetLabel()));
connect(ui->dataTable->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(updateBrowseDataColumnWidth(int,int,int)));
connect(editDock, SIGNAL(recordTextUpdated(QPersistentModelIndex, QByteArray, bool)), this, SLOT(updateRecordText(QPersistentModelIndex, QByteArray, bool)));