Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.0
-
Ubuntu 22.04
Android 14
-
-
2024wk48s3FOQtforAndroid
Description
Hi,
I created a basic app with MainWindow via Qt Creator. I’m encountering an issue with Qt 6.8.0 where touch interactions in QDialog windows are offset from where I actually tap. The dialog window is relatively large, and as the number of objects within it increases, the touch points seem to shift even more, registering touches in the wrong locations. This issue does not occur in Qt 6.5.3, where everything works as expected.
Host: Ubuntu 22.04 x64
Kit: Qt 6.8.0 arm64-v8a
Ndk: 27.1.12297006
Java: openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment (build 17.0.12+7-Ubuntu-1ubuntu222.04)
Build-tools: v34.0.0
Build platform SDK: 34
Make: Cmake (Default)
Here is basic example, I cant click or push buttons:
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QDialog> #include <QPushButton> #include <QVBoxLayout> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); QPushButton *openDialogButton = new QPushButton("Open Dialog", this); connect(openDialogButton, &QPushButton::clicked, this, &MainWindow::openDialog); setCentralWidget(openDialogButton); } MainWindow::~MainWindow() { delete ui; } void MainWindow::openDialog() { QDialog dialog(this); dialog.setWindowTitle("Example Dialog"); QPushButton *button1 = new QPushButton("Button 1", &dialog); QPushButton *button2 = new QPushButton("Button 2", &dialog); QVBoxLayout *layout = new QVBoxLayout(&dialog); layout->addWidget(button1); layout->addWidget(button2); connect(button1, &QPushButton::clicked, &dialog, &QDialog::accept); connect(button2, &QPushButton::clicked, &dialog, &QDialog::reject); dialog.setMinimumSize(250, 150); dialog.exec(); }
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private slots: void openDialog(); private: Ui::MainWindow *ui; }; #endif // MAINWINDOW_H
When running the sample code and opening the QDialog, you will see two buttons. In Qt 6.5.3, these buttons are clickable as expected, but in Qt 6.8.0, they cannot be clicked directly. Instead, tapping elsewhere on the screen registers as if I’ve tapped the button.