Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.8.0
-
None
Description
When setting
qputenv("QSG_NO_VSYNC", "1");
or either using QSurfaceFormat, and animating the window, input text stops working, as well as mouse hover and press events (click events seems to work).
I attached a video showing the problem.
Here's a very simple way to reproduce the issue on macOS:
main.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { qputenv("QSG_NO_VSYNC", "1"); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; QObject::connect( &engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.loadFromModule("testInputAfterAnimationQML", "Main"); return app.exec(); }
Main.qml
import QtQuick import QtQuick.Controls 2.15 Window { id: window width: 400 height: 400 visible: true title: qsTr("Hello World") Behavior on width { SpringAnimation { spring: 6 damping: 0.2 } } Behavior on x { SpringAnimation { spring: 6 damping: 0.2 } } Column { anchors.centerIn: parent Button { id: testButton text: "Click me" onClicked: { window.width += 200; window.x -= 100; } } TextArea { placeholderText: "Try to type here" } } }
The issue is not present on Windows 11 in my tests.