In a modal dialog i set the shortcut http://qt-project.org/doc/qt-4.8/QKeySequence::HelpContents to the help button, but this shortcut is not working, the button is not clicked if I press the corresponding shortcut.
I did some tests, and it seems, that the shortcuts http://qt-project.org/doc/qt-4.8/QKeySequence::HelpContents only work if set to an action in the menu of the main application windows. If I open the dialog as non modal, the application shortcut also work, but not if the dialog is open as modal.
I tried also with an event filter in the dialog and in the application, but when i press under mac the Command-? or under windows F1 i see the event for the Command key but not for the ? key. I don't understand who is eating this key press.
Someone can explain me where the error is? Is these a way to connect QKeySequence::HelpContents to the help button in a dialog?
Thanks.
Code:
- {
- ui->setupUi(this);
- }
I did some tests, and it seems, that the shortcuts http://qt-project.org/doc/qt-4.8/QKeySequence::HelpContents only work if set to an action in the menu of the main application windows. If I open the dialog as non modal, the application shortcut also work, but not if the dialog is open as modal.
Code:
- {
- ui->setupUi(this);
-
- menuBar()->addMenu(helpMenu);
- }
I tried also with an event filter in the dialog and in the application, but when i press under mac the Command-? or under windows F1 i see the event for the Command key but not for the ? key. I don't understand who is eating this key press.
Someone can explain me where the error is? Is these a way to connect QKeySequence::HelpContents to the help button in a dialog?
Thanks.