点击Qtableview表头,触发事件

connect(horizontalHeader(), SIGNAL(sectionClicked(int)),
                this, SLOT(onHeaderClicked(int)));

refer to http://developer.qt.nokia.com/faq/answer/how_can_i_sort_the_items_in_a_qtablewidget_on_multiple_columns

https://bbs.csdn.net/topics/360139821

原文地址:https://www.cnblogs.com/liujx2019/p/10452190.html