Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
5.1.0 , 5.1.1
-
None
-
Ubuntu Linux on X86_64 bit
Android SDK latest (August 13)
Android NDK r9
Qt 5.1.1
Target is: Android_for_arm_GCC_4_8_Qt_5_1_1
Description
We need to make our Qt app interact with the Android 'Menu' hardware key. So far we can interact with the 'Back' and 'Search' keys OK. Here is the code that does not work (MainWindow class is derived from QWidget).
void MainWindow::keyPressEvent(QKeyEvent *ev)
{
int key = ev->key();
if (key == Qt::Key_Menu)
{ label5->setText("Hey you just hit the Menu key"); return; } label5->setText(QString("Hey you just hit the (%1) key").arg(key));
QWidget::keyPressEvent(ev);
}
This code will display the Search-key code when pressed, but there is no output at all when the 'Menu' key is pressed.
Regards,
Chris
Attachments
Issue Links
- is replaced by
-
QTBUG-32334 Menu button events are not propagated to QML
-
- Closed
-