Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.0, 5.15.3, 6.0.1
-
Android
-
-
06b0b2be160e6122d1a80e7c37916512429cd145 (qt/qtbase/dev) 6152d2cb3f715782106f26e1870453a1bb89b87a (qt/tqtc-qtbase/5.15)
Description
Hi,
I'm making a Qt 5.10 application for Windows, Linux, MacOS etc...
I use in particular dialog boxes written in QML that I display using c++.
for example this box:
The C++ part:
component_aideQML = new QQmlComponent (engine_configuration); component_aideQML->loadUrl (QUrl ("qrc: ///qml/help. qml"); helpQML =qobject_cast<QQuickWindow*> component_aideQML->create (); helpQML->setWidth (450); helpQML->setHeight (300); helpQML->setPosition (0.0,0.0.0); helpQML->setFlags (Qt:: WindowStaysOnTopHint | Qt:: FramelessWindowHint); helpQML->showNormal ();
the QML part :
import QtQuick 2.9 import QtQuick.Window 2.3 import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.2 import MyLib 1.0 Window { id: main2 property double trans: anchoraide.Trans property double coef: anchoraide.Coef property string texte: anchoraide.texte Material.theme: Material.Dark Material.accent: Material.Red modality: Qt.NonModal //visibility: Window.Windowed width: 450 height: 300 color: "#333333" opacity: trans Image { id: image_fermer width: 34 height: 34 anchors.top: parent.top anchors.topMargin: 0 anchors.right: parent.right anchors.rightMargin: 0 source: "../res/icons/fermer.png" MouseArea{ anchors.fill: image_fermer onClicked: { anchoraide.checkPost_command("exit") } } } } Component.onCompleted: { visible = true } }
Everything works fine if I use setPosition (0.0,0.0.0);
when I press the red button, the checkPost_command ("exit") function in the MouseArea sends the "exit" text to the c++ part that allow to close the window...
On the other hand, everything changes if I use setPosition (0.0,200.0) for example.
Clicking on the red button no longer sends the signal, but strangely enough, clicking 200 pixels below the red picture will close the window!
It is as if the MouseArea had been translated by 200 + 200 pixels on the y-axis (see location of the black circle).
Everything works normally on Windows, Linux and MacOS. The problem only appears with Android...
How do can fix that?
With my thanks,
Francky033