Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.1
-
None
-
-
4f4a33196dc37a9405a8dbd20a1e63d36e000d2f (qt/qtbase/dev)
Description
Hi
I created a testcase for showing bug. QMenu uses font() from QAction::font() but not the stylesheet font. As you can see
The code in QMenuPrivate::updateActionRects() (https://code.woboq.org/qt5/qtbase/src/widgets/widgets/qmenu.cpp.html#447) calculates the text bounding rectangle solely based on QAction::font(), i.e. does not respect the font set via the style sheet.
QMenu uses QAction::font() for its size hint but the style sheet for drawing.
Regards