unable to focus either on pushBUtton or tableview in same .ui file



  • Hi...In my code i have diff dialogs, while moving from one dialog to another using remote for RDK set top box am facing issue,code is
    (in dialog1)
    void dialog1::iRkeypressevent(int key)
    {
    if(key==some key integer)
    {
    dialog2=new dialog();//calls constructor
    dialog1->hide();
    dialog2->showNormal();
    }
    }
    (in dilaog2)
    in constructor i put

    ui->pushButton->setFocus();

    void dialog2::iRkeypressevent(int key)
    {
    if(key==some int key)
    {
    QModelIndex index = ui->tableView->model()->index(int,int);
    ui->tableView->setCurrentIndex(index);
    }
    }
    when entering from dailog1 to dialog2, screen is getting stuck and no operation is appearing on screen i donno is it timer issue or thread issue.

    in dialog2.ui i have pushbuttons as well as table view so using above code i can able to focus on either one of them only for remote key mapping. but based on condition i need to focus on different widgets like table view or pushbuttons. focus is happenig but using stylesheet hover i can able to identify which item is selected, that hover is not updating for remote key mapping.

    Thanks......!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.