How to receive signals from a QTableView to sort by column?

  • Hi,
    I am venturing into SQL programming with Qt. I have the QTableView and the QSqlRelationalDelegate and the QSQLRelationalTableModel and they work nice! Yet, how can I make my table to react to a click int the header in order to sort by that column?


  • QTableView* v = .....
    v->setSortingEnabled( true );

    QSqlTableModel implements sort(), so I believe that is it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.