Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135253

[REG 6.7.2 -> 6.7.3+] Android - Any popup widgets on Android is completly broken

    XMLWordPrintable

Details

    • Android
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              freed Igor Bugaev
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes