Qt World Summit: Register Today!

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

  • 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?

  • Lifetime Qt Champion


    When are you doing this ?

  • 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.

  • Lifetime Qt Champion

    Can you show the eventFilter code ?

Log in to reply