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

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

      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

        1. output_5_11_3.PNG
          output_5_11_3.PNG
          15 kB
        2. output_5_15.PNG
          output_5_15.PNG
          14 kB
        3. qtbug_86754.png
          qtbug_86754.png
          6 kB
        4. qtbug86754.zip
          9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved: