Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.3, 5.9.6, 5.12.0 Beta 2
-
None
Description
If a QWidget is set with the attribute Qt::WA_StaticContents, and then the widget's height is reduced to 0, errors appear (on Windows only):
QPainter::begin: Paint device returned engine == 0, type: 3 QPainter::setCompositionMode: Painter not active
Reproduction steps
1. Build and run the following code:
#include <QApplication> #include <QWidget> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget* widget = new QWidget(); widget->setAttribute(Qt::WA_StaticContents); widget->show(); return a.exec(); }
2. Reduce the window height until its height is 0.