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

QDialog touch is broken in most Qt versions of android above 6.6.3

XMLWordPrintable

    • Android
    • 2025wk26s2QtforAndroid, 2025wk28s2QtforAndroid, 2025wk30s2QtforAndroid, 2025wk32s2QtforAndroid, 2025wk34s2QtforAndroid, 2025wk38s2QtforAndroid

      Tested versions 6.6.3 6.7.3 6.8.3 6.9.0 6.9.1
      Cannot press buttons or input text on Android Qt versions 6.7.3 and 6.8.3 and 6.9.0
      This code works for everything windows and ubuntu but is broken in Android Qt versions 6.7.3 and 6.8.3 and 6.9.0
      Works in android 6.6.3 and android 6.9.1
      Run the below code on android. You cannot press the buttons or affect the dialog in any way on the broken versions of Qt... at least it finally got fixed in 6.9.1

      #include <QGuiApplication>
      #include <QApplication>
      #include <QDialog>
      #include <QLabel>
      #include <QPushButton>
      #include <QVBoxLayout>

      int main(int argc, char *argv[])
      {
          QCoreApplication::setOrganizationName("JustATest");
          QCoreApplication::setApplicationName("GuiTest");

          QApplication app(argc, argv);

          QDialog dialog;
          dialog.setWindowTitle("My Dialog");

          QLabel *label = new QLabel("This is a simple dialog.");
          QPushButton *okButton = new QPushButton("OK");
          QPushButton *cancelButton = new QPushButton("Cancel");

          QVBoxLayout *layout = new QVBoxLayout;
          layout->addWidget(label);
          layout->addWidget(okButton);
          layout->addWidget(cancelButton);
          dialog.setLayout(layout);

          QObject::connect(okButton, &QPushButton::clicked, &dialog, &QDialog::accept);
          QObject::connect(cancelButton, &QPushButton::clicked, &dialog, &QDialog::reject);

          if (dialog.exec() == QDialog::Accepted)

      {         qWarning() << "Dialog was accepted";     }

          else
         

      {         qWarning() << "Dialog was rejected";     }

      }

       

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

            koalajar Konsta Alajärvi
            nolimitconnect-developer Brett Joned
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes