Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P3: Somewhat important
-
Resolution: Done
-
Affects Version/s: 5.0.0, 5.12
-
Fix Version/s: 5.14.2, 5.15.0 Alpha
-
Component/s: GUI: Look'n'Feel, Widgets: Styles
-
Labels:None
-
Platform/s:
-
Commits:f9cd8fef5e9062f6bd23d70693f4dfb7e32efc78 (qt/qtbase/5.14)
Description
On Windows 7/10, whenever a QPushButton has a QIcon and QMenu set, the text will get truncated. Running the following code example should demonstrate the issue:
from PySide2.QtGui import QIcon from PySide2.QtWidgets import QApplication, QPushButton, QMenu, QHBoxLayout, QWidget, QStyle app = QApplication([]) btn = QPushButton('Truncated Text') btn.setIcon(QIcon(app.style().standardIcon(QStyle.SP_ArrowUp))) btn.setMenu(QMenu(btn)) lo = QHBoxLayout() lo.addStretch() lo.addWidget(btn) wid = QWidget() wid.setLayout(lo) wid.show() app.exec_()