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

QColumnView example



  • Hello, how can I use QColumnView with a QSqlTableModel object?

    For example, with this code

    @QSqlTableModel *model = new QSqlTableModel ;
    model->setTable("dataBaseTable");
    model->select();

    QColumnView *view = new QColumnView;
    view->setModel(model);
    @

    I can see the first column of dataBaseTable in the first column of the columnView, but if I click one element of the view, how I can to see the next column of the databaseTable in the next column of the columnView?

    Thanks!!


Log in to reply