Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70648

Bug in QMenu when we use stylesheet

    XMLWordPrintable

Details

    • Linux/X11
    • 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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            montel Montel Laurent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes