Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.10
-
None
-
Windows 10, Qt 5.10, MSVC 2015, staticly built Qt with the following configuration:
{code:java}
configure -confirm-license -recheck -prefix c:\qt\5.10.0\msvc2015_5_10_static_32 -commercial -debug-and-release -static -static-runtime -nomake examples -nomake tools -nomake tests -opengl dynamic -openssl-linked -I c:\openssl-lib\include -L c:\openssl-lib\lib OPENSSL_LIBS="libeay32MT.lib ssleay32MT.lib" -qtnamespace com_imaginando_qt_5_10_32{code}Windows 10, Qt 5.10, MSVC 2015, staticly built Qt with the following configuration: {code:java} configure -confirm-license -recheck -prefix c:\qt\5.10.0\msvc2015_5_10_static_32 -commercial -debug-and-release -static -static-runtime -nomake examples -nomake tools -nomake tests -opengl dynamic -openssl-linked -I c:\openssl-lib\include -L c:\openssl-lib\lib OPENSSL_LIBS="libeay32MT.lib ssleay32MT.lib" -qtnamespace com_imaginando_qt_5_10_32{code}
-
mapFromGlobal: 58f46077015fc5dd71543ca25f762ff34fc12621 (qtbase/5.10, 3.11.2017, 5.10.0)
Description
My application requires to be embbeded on a native Windows window to be used as a plugin on a software host. To embeb it I do the following:
window = new QWindow(); window->setFlags(Qt::Tool | Qt::FramelessWindowHint); window->setGeometry(0, 0, 800, 600); quickView = new QQuickView(); quickView->setSource(QUrl("qrc:/main.qml")); quickView->setFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); SetParent((HWND)window->winId(), nativeWindowPointer); quickView->setParent(window); quickView->show(); window->show();
Everything works perfectly with a mouse but not with a touchscreen. On a standalone Qt app, the touch is correctly handled, but when the program runs inside the host, with the QWindow reparented to the provided window, the touch screen suffers an offset. The offset varies when the windows is moved. Mouse events are processed correctly in both situations. This only affects touch events.
I have been able to create a Qt based example by instanciating two windows. One window that will have the second window embed as I need in my real case scenario.
In attached example, a first window is created and then the secondd window is embbeded onto the first window. If you try to interact with the red rectangle with the mouse you will succeed to have console output whatever the window position is.
With touch input, it will work unless the window position is changed. The touch mapping is wrong if the parent window position is changed as it seems to rely on the initial window position.
Attachments
Issue Links
- relates to
-
QTBUG-41186 Clarify functionality of QWindow::fromWinId() on the various platforms
- Reported