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

error with QTableView



  • Hello friends, I have the following problem, I get this error in my code, which surprises me is that, when I compiled this same code in a previous version of qt it worked fine, now I am with version 5.15, it seems strange to me, some recommendation, or reason why this happens.

    connect(ui->tableView->selectionModel,&QItemSelectionModel::currentChanged,this,[&](){
          //todo
        });
    

    !14342206-f1cc-479d-b559-c42043bfb386-image.png

    this is the error message:

    6b0f4c1b-4bf9-4178-853e-f372b02a3117-image.png



  • @J-Hilk said in error with QTableView:

    with high certainty I can say QTableView has no public members!
    use the getter function
    ui->tableView->selectionModel()

    ahh ok, what a mistake mine, and what a silly question mine too, thanks friend, I solved my problem, greetings


  • Moderators

    @lincoln said in error with QTableView:

    ui->tableView->selectionModel

    with high certainty I can say QTableView has no public members!

    use the getter function

    ui->tableView->selectionModel()



  • @J-Hilk said in error with QTableView:

    with high certainty I can say QTableView has no public members!
    use the getter function
    ui->tableView->selectionModel()

    ahh ok, what a mistake mine, and what a silly question mine too, thanks friend, I solved my problem, greetings


Log in to reply