Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Highlight third row in tableView after change of focus to the tableView

    General and Desktop
    2
    4
    925
    Loading More Posts
    • 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.
    • 1
      169Martin last edited by

      Hi, with these functions i can highlight any cell in tableView..but my problem is that it works only for first tableView. I have them more....

      Here is pseudo-code, i have it implemented for every tableView :

      @QModelIndex index = ui->trackView->model()->index(2,0);
      trackSelection->setCurrentIndex(index, QItemSelectionModel::Select);--@

      Im changing FOCUS between tableViewsWith 'TAB key' . Is this some sort of bug?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        When are you doing this ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • 1
          169Martin last edited by

          I have eventFilter on these tablieViews and when QEvent::FocusIn occurs on some tableView, i want to highlight some row..for example first.

          I need this becouse i controll app with keyboards and when i load data to table and change focus to this tableView, no row is selected in default .

          That pseudo code above works only for first tableView...on the others tables its just ignored.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Can you show the eventFilter code ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post