Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.3, 6.8.2, 6.8.3, 6.8
-
None
-
-
2025wk18s1QtforAndroid
Description
Steps to reproduce
1. Create QWidget Android application
2. Show any popup widget (QMenu, QWidget with show(), etc)
3. No touch events is delivered to that widget impossible to click on any widget on that widget.
Everything is fine on iOS.
Also everyfing is fine on Qt 6.7.2 with Android. The issue appeared in version 6.7.3 and exists in all subsequent versions.
Tested on
Android 12 (SM-T505)
Android 11 (M2101K6G)
Android 15 - Pixel Emulator
Apparently, this issue occurs because touch events are delivered with incorrect coordinates, without adjusting for the position of the popup widget itself.
The minimum C++ code to reproduce
int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; QPushButton* mainButton = new QPushButton("Show Popup", &w); mainButton->setGeometry(50, 50, 150, 40); QWidget* popup = new QWidget(&w, Qt::Popup); popup->setFixedSize(300, 300); popup->setStyleSheet("background-color: grey; border: 1px solid black;"); QPushButton* button = new QPushButton("Click Me", popup); button->setGeometry(100, 130, 100, 40); // BUG - the click signal is never called QObject::connect(button, &QPushButton::clicked, button, []() { qDebug() << "Popup button clicked!"; }); QObject::connect(mainButton, &QPushButton::clicked, &w, [popup](){ popup->move(100, 100); popup->show(); }); w.show(); return a.exec(); }
Attachments
Issue Links
- duplicates
-
QTBUG-130576 Touches Are Handled Incorrectly with QDialog on Qt 6.8.x Android
-
- Closed
-