Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QTableWidget: allow sorting only by specific columns?



  • I'm reasonably familiar with sorting, inc. custom sorting, QTreeViews and QTreeWidgets. But every time I did it before I simply turned the sorting on in that widget's properties and could sort by any column. But what if there are some columns such that sorting them makes no sense? What's the best way to handle this? Ideally, I would like to not see the sorting control (an arrow in the header) at all for those columns. Is it doable?


  • Lifetime Qt Champion

    Hi,

    AFAIK, it's not implemented and there's even an old feature request for it.


Log in to reply