PDA

View Full Version : QToolbar



swrer
10th March 2010, 23:37
I can't change the size of a button in qtoolbar ...


QPushButton e1PushButton = new QPushButton(this);
e1PushButton .resize(20, 20);
tb.addWidget(e1PushButton );

And its not working ...
The button is with the default size :(

wysota
11th March 2010, 00:08
Push buttons have a minimum size hint set (40x20 on my system, as far as I remember), you can't decrease their size more when they are in a layout. You can use QToolButton instead. But then the question is what is the reason of placing a push button in a toolbar when you have QAction at your disposal.