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

[Reg 5.12.4-> 5.12.5]Action text overlaps the shortcut in menu when padding is used

    XMLWordPrintable

Details

    • Windows
    • c8cb2409477bdc3bc41d6bbdfc5055441cda084f 294b50e1f5c388f666d10febe3fcc024d1d13c24 (qt/qtbase/6.1)

    Description

      When an action has a shortcut and padding is applied to QMenu::item using stylesheet, the action text overlaps the shortcut text. It works fine with 5.11.3.

         QAction rename;
         rename.setText("Rename");
         rename.setShortcut(Qt::Key_F2);
         QMenu* menu = window.menuBar()->addMenu("Menu");
         menu->setStyleSheet("QMenu::item{padding-left:100px;padding-right:100px}");
         menu->addAction(&rename);
      

      Please refer to the attached sample and snapshots for 5.11.3 and 5.15.0

      Attachments

        1. output_5_11_3.PNG
          15 kB
          Shveta Mittal
        2. output_5_15.PNG
          14 kB
          Shveta Mittal
        3. qtbug_86754.png
          6 kB
          Christian Ehrlicher
        4. qtbug86754.zip
          9 kB
          Shveta Mittal

        Issue Links

          For Gerrit Dashboard: QTBUG-86754
          # Subject Branch Project Status CR V

          Activity

            People

              vhilshei Volker Hilsheimer
              shmittal Shveta Mittal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews