QMessageBox not receiving keyPressEvents
-
wrote on 19 Oct 2016, 15:15 last edited by
Hi, I have subclassed QMessasgebox to add a timer and also an override of the keyPressEvent. There are 2 buttons for accept and retry. The timer and buttons appear to operate correctly but I am not receiving any keyPressEvents. Prior to usage I have created my QApplication but have not called QApplicaion.exec() and have not created a main QWidget. If I instantiate a QWidget my message box starts to receive keyPressEvents. Is a QWidget needed for QMessagbox to receive keyPressEvents? I thought when QMessagebox.exec() was called Qt creates an event queue which would post keyPressEvents? This app uses an older version of Qt 4.7.0 running on an Arm platform, Thanks.
-
Hi, I have subclassed QMessasgebox to add a timer and also an override of the keyPressEvent. There are 2 buttons for accept and retry. The timer and buttons appear to operate correctly but I am not receiving any keyPressEvents. Prior to usage I have created my QApplication but have not called QApplicaion.exec() and have not created a main QWidget. If I instantiate a QWidget my message box starts to receive keyPressEvents. Is a QWidget needed for QMessagbox to receive keyPressEvents? I thought when QMessagebox.exec() was called Qt creates an event queue which would post keyPressEvents? This app uses an older version of Qt 4.7.0 running on an Arm platform, Thanks.
wrote on 19 Oct 2016, 15:23 last edited by@allagar Hi! There are couple of things that might go wrong, please post a minimal example so we don't have to poke around in the dark.
-
wrote on 20 Oct 2016, 10:02 last edited by
Wieland, many thanks for the reply after more investigation this appears to be related to my application and how the keypad is being supported, I have marked this as solved. Thanks again.
3/3