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. Highlight third row in tableView after change of focus to the tableView

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

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.1k 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.
  • 1 Offline
    1 Offline
    169Martin
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • 1 Offline
        1 Offline
        169Martin
        wrote on last edited by
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          0

          • Login

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