Hi
Hi,
I have a list of 10 pushbuttons on the screens. I navigate through arrow keys.
I am trying to refresh the text on the pushbuttons once the last pushbutton on the screen is reached. For this I have written the below code.

void testApp::keyPressEvent(QKeyEvent *event)
{
if(event->key() == Qt::Key_Down && buttons[9]->hasFocus())
{

refresh();

}
}

But looks like there is something wrong in the if condition. Its not working. Can someone help me on this?

I am trying to do the refresh when the focus is on the last button.

Thanks.