Details
-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
None
-
5.1.1
-
None
-
Windows 8
Description
If a tool button with an icon and text under it is added to a toolbar, Qt 5.1.1 doesn't display the text correctly: letters like "q", "g" or "p" are shrunk.
The following code demontrates the issue:
tool button text shrinking in Qt 5.1.1
#include <QtWidgets/QToolButton> #include <QtWidgets/QHBoxLayout> #include "testtoolbara.h" testtoolbara::testtoolbara(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); QToolButton *toolButton1 = new QToolButton; toolButton1->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); toolButton1->setIcon(QIcon("z:/page-settings.png")); toolButton1->setText("Qt 5.1.1"); toolButton1->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QToolButton *toolButton2 = new QToolButton; toolButton2->setText("Buggy"); toolButton2->setIcon(QIcon("z:/page-settings.png")); toolButton2->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); toolButton2->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); ui.mainToolBar->addWidget(toolButton1); ui.mainToolBar->addWidget(toolButton2); } testtoolbara::~testtoolbara() { }
There is a picture attached where text shrinking is shown.