Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.9, 5.15.0, 5.15.2
-
-
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
Issue Links
- relates to
-
QTBUG-90242 QMenu stylesheet has alignment issue when one item has icon/checkable
- Closed
For Gerrit Dashboard: QTBUG-86754 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
344799,1 | Fix Action text overlaps the shortcut in menu when padding is used | dev | qt/qtbase | Status: ABANDONED | -2 | 0 |
352822,3 | Calculate space requirement of menu items based on widest elements | dev | qt/qtbase | Status: MERGED | +2 | 0 |
353115,2 | Calculate space requirement of menu items based on widest elements | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
353116,2 | Calculate space requirement of menu items based on widest elements | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |