Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
4.8.2, 5.6.0
-
None
-
All platforms.
-
daa39f84996700d2459d8e570ac1b3f2f2cdffd0
Description
If a widget uses a CSS style sheet (via setStyleSheet) which changes the font size of QToolTip (or of a basse class, e.g. QWidget),
then a QToolTip shown on that widget will calculate a wrong size, so that the text does not fit.
The QToolTip code resizes to a wrong size because it uses the QApplication::font("QToolTip") method to detect the font
instead of using the CSS style. The rendering takes the style sheet into account and thus the text does not fit in the QToolTip anymore.
The reason for this is that the CSS style is taken over too late, it has to be set on QToolTip label BEFORE resizing, otherwise the style sheet does not affect the resizing.
I attached a patch which fixes the problem.
Attachments
Issue Links
- duplicates
-
QTBUG-64550 Windows: ToolTip text is cut when using style sheets
- Closed