Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error with QTableView

error with QTableView

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 333 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • lincolnL Offline
    lincolnL Offline
    lincoln
    wrote on last edited by lincoln
    #1

    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

    Solitary wolf

    J.HilkJ 1 Reply Last reply
    0
    • lincolnL Offline
      lincolnL Offline
      lincoln
      wrote on last edited by
      #3

      @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

      Solitary wolf

      1 Reply Last reply
      1
      • lincolnL lincoln

        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.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #2

        @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()


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        2
        • lincolnL Offline
          lincolnL Offline
          lincoln
          wrote on last edited by
          #3

          @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

          Solitary wolf

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved