QToolButton icon scaled down on Windows - why?
-
ah, ok ... I have thought you setIconSize by tool bar
but anyway I tested this and it works:
@
ui->setupUi(this);
QToolButton *button1 = new QToolButton;
QToolButton *button2 = new QToolButton;
QToolButton *button3 = new QToolButton;
QGroupBox *groupBox = new QGroupBox();
button1->setText("Button 1");
button1->setIconSize(QSize(32,32));
button1->setIcon(QIcon("test.ico"));
button2->setText("Button 2");
button3->setText("Button 3");
QHBoxLayout *hbox = new QHBoxLayout;
hbox->setContentsMargins(0, 0, 0, 0);
hbox ->addWidget(button1);
hbox ->addWidget(button2);
hbox ->addWidget(button3);
groupBox->setLayout(hbox);
ui->mainToolBar->addWidget(groupBox); @ -
yes!
I tested with qt 5.1.1 mingw and qt 5.2.0 beta VS 2010 on Windows XP ... on both it's working fine -
Sounds like it could be a Windows specific bug. Did you check on the "bug report system":http://bugreports.qt-project.org whether something like that was reported ?
-
Not necessarily, there can be regressions/subtle differences between platforms.
Then you can open a new report with a minimal compilable example that helps reproduce the behavior. Providing the link here would be a plus
-
-
Seems like it's a problem on Windows 7 as well. Added this to the bug report. I could sort of accept that this was a problem on XP only, but not across the whole Windows line as it seems. I'm wondering why no-one else notices things like this? Given the amount of bug reports from me alone regarding widgets (especially on the Mac), I'm gonna hit an email to Digia, having ranted basically everywhere else about the state of Widgets and desktop platforms to no avail. This is soooo frustrating!