Flicker on Windows 7 with Aero disabled when moving any window over a Qt Quick based window - a bug in qwindowswindow.cpp?
I am new to Qt Quick. It is really helpful for me to prototype UI part for my project.
But I found such an issue - when moving any window over a Qt Quick based window, I saw horrible flickers. And this issue only appears when Areo of Windows 7 is disabled.
I looked into Qt 5.5's source code and found the following problematic lines in qwindowswindow.cpp, from line 1503.
bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
// Ignore invalid update bounding rectangles
if (!GetUpdateRect(m_data.hwnd, 0, FALSE))
if (message == WM_ERASEBKGND) // Backing store - ignored.
The first 'if' statement returning false makes the second 'if' statement failed in some case. Then Windows refreshes background for QWindow with some system color. This should be an unexpected behavior.
After exchanging the two 'if' statements, the flicker goes away.