Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.4.3
-
None
-
591f5353c88439594b9340226b4843d7ca2888ef
Description
If a global font is set for QApplication created using pixelSize, the following assert is triggered in QFont when trying to draw DockWidgets.
ASSERT failure in QFont::setPointSize: "point size must be greater than 0", file text/qfont.cpp, line 855
in drawControl() method for dockwidgets, there is an attempt to reduce font size by one, but code asks for pointSize, which returns -1 in this case.
//from QPlastiqueStyle.cpp
// Draw the text centered
QFont font = painter->font();
font.setPointSize(font.pointSize() - 1);
painter->setFont(font);
painter->setPen(dockWidget->palette.windowText().color());
QFontInfo class should be used instead so point size can be queried successfully disregarding of the way the font was initialized.