Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.0, 5.9.6, 5.12.0, 5.13.1
-
None
-
Windows 7 x64, MSVC2012
Description
A frameless, native widget with translucent background will produce a warning every time it is updated:
UpdateLayeredWindowIndirect failed for ptDst=(11, 11), size=(196x84), dirty=(196x84 11, 11) (The parameter is incorrect.)
A simple example of the issue. Resize the window to trigger update. The warning floods the output.
int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget* foo = new QWidget(); foo->setWindowFlags(foo->windowFlags() | Qt::FramelessWindowHint); foo->setAttribute(Qt::WA_NativeWindow); foo->setAttribute(Qt::WA_TranslucentBackground); QWidget w; w.setLayout(new QVBoxLayout()); w.layout()->addWidget(foo); w.show(); return a.exec(); }