Hi,
I am using Qt 4.4.3.
I have a dialog comprising of QPushButtons (For OK and Cancel) and 2 QToolButtons on the dialog neat the QPushButtons.
Though I have set the tabfocus to 'StrongFocus' and explicitly set the tab order, the QToolButtons don't get tab focus at all. Even in the QTDesigner preview, I see focus going between the QPushButton's OK and Cancel, and the subsequent two clicks on the tab button don't do any thing and then on the third tab click, focus comes back to the QPushButton.
I tried explicitly defining it as follows:
:
:
:
// Setting focus
buttonStart->setFocusPolicy(Qt::StrongFocus);
buttonStop->setFocusPolicy(Qt::StrongFocus);
// Setting tab order
setTabOrder(buttonOK, buttonCancel);
setTabOrder(buttonCancel, buttonStart);
setTabOrder(buttonStart, buttonStop);
// Where buttonOK and buttonCancel are QPushButtons
QToolButton *buttonStart;
QToolButton *buttonStop;
:
:
:
// Setting focus
buttonStart->setFocusPolicy(Qt::StrongFocus);
buttonStop->setFocusPolicy(Qt::StrongFocus);
// Setting tab order
setTabOrder(buttonOK, buttonCancel);
setTabOrder(buttonCancel, buttonStart);
setTabOrder(buttonStart, buttonStop);
// Where buttonOK and buttonCancel are QPushButtons
To copy to clipboard, switch view to plain text mode
Help in this matter will be appreciated.
Thanks.
Bookmarks