Qt5 QWindow inside windowContainer not receiving keyboard events on Wayland
-
Hello
I have a QWindow that I use to render to with OpenGL.
I set the QWindow inside a QWidget using 'QWidget::createWindowContainer'.
On Wayland (KDE Plasma, 6.6.4, Qt 5.15.17)
I can't receive any input events (keypresses, key releases).
The 'keyPressEvent' virtual function is NOT invoked on the QWindow. I also tried registering an event filter on the QWidget that the createWindowContainer returns but that also didn't work
Is there a solution to this?
Additional bonus problems and incompetence points:
-
I'm using QWindow instead of QOpenGLWidget because QOpenGLWidget has DOG SHIT for performance (an order of magnitude difference between the two, so the integration in the latter obviously does something mega stupid.. a glReadPixels probably..)
-
If I set ´QT_QPA_PLATFORM=xcb' then the keyboard input event issue goes away but I get random crashes in the NVIDIA (580.76.05) OpenGL driver in random API calls such as glBufferData or even glClearColor. So obviously with this platform integration there's something seriously broken with the whole graphics stack.
-
Also the rendering sometimes goes blank.
Any ideas?
-
-
Hi,
Something is not clear: are you using 5.15.17 or is it the Qt version used by Plasma ?
Do you have the same issue if building your application with Qt 6 ? -
Hi,
Something is not clear: are you using 5.15.17 or is it the Qt version used by Plasma ?
Do you have the same issue if building your application with Qt 6 ?@SGaist said in Qt5 QWindow inside windowContainer not receiving keyboard events on Wayland:
Hi,
Something is not clear: are you using 5.15.17 or is it the Qt version used by Plasma ?
Do you have the same issue if building your application with Qt 6 ?I suppose KDE is using Qt6 which is installed side by side. My Application is built against this Qt5 version.
"Do you have the same issue if building your application with Qt 6 ?"
I'm not going to port +200kloc to Qt6 just to try this. This is on Qt5 and that's that.
-
@SGaist said in Qt5 QWindow inside windowContainer not receiving keyboard events on Wayland:
Hi,
Something is not clear: are you using 5.15.17 or is it the Qt version used by Plasma ?
Do you have the same issue if building your application with Qt 6 ?I suppose KDE is using Qt6 which is installed side by side. My Application is built against this Qt5 version.
"Do you have the same issue if building your application with Qt 6 ?"
I'm not going to port +200kloc to Qt6 just to try this. This is on Qt5 and that's that.
This post is deleted! -