Avoid selecting a column when the table header is clicked for sorting

See issue #1717
This commit is contained in:
mgrojo
2019-12-22 00:15:29 +01:00
parent 61c8f47861
commit 99bc7536ed

View File

@@ -237,6 +237,10 @@ ExtendedTableWidget::ExtendedTableWidget(QWidget* parent) :
m_tableHeader = new FilterTableHeader(this);
setHorizontalHeader(m_tableHeader);
// Disconnect clicking in header to select column, since we will use it for sorting.
// Note that, in order to work, this cannot be converted to the standard C++11 format.
disconnect(m_tableHeader, SIGNAL(sectionPressed(int)),this, SLOT(selectColumn(int)));
// Set up vertical header context menu
verticalHeader()->setContextMenuPolicy(Qt::CustomContextMenu);