Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0, 5.12
-
None
-
-
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_()