Qt-interest Archive, March 2007
QToolButton/QToolBar size in Qt4
Message 1 in thread
Hello,
This maybe a stupid question: do anybody know why the QToolButton inside a
QToolBar larger than the "standard" toolbutton size in Qt4 when the
contained icon has the normal small size, i.e 16x16 pixel? In Qt3 it had the
"normal" size like in other applications? - or is it a QToolBar spacing
problem/question?
Is there a way to change it without subclassing QToolButton or QToolBar?
thank,
norbert
--
[ signature omitted ]
Message 2 in thread
Norbert Szabó wrote:
> This maybe a stupid question: do anybody know why the QToolButton inside a
> QToolBar larger than the "standard" toolbutton size in Qt4 when the
> contained icon has the normal small size, i.e 16x16 pixel? In Qt3 it had
> the
> "normal" size like in other applications? - or is it a QToolBar spacing
> problem/question?
> Is there a way to change it without subclassing QToolButton or QToolBar?
I'm not sure if this is the same problem as we had, but try if doing
explicit
toolbutton->setIconSize(QSize(16, 16));
helps.
--
[ signature omitted ]
Message 3 in thread
Maciek Niedzielski wrote:
> I'm not sure if this is the same problem as we had, but try if doing
> explicit
> toolbutton->setIconSize(QSize(16, 16));
> helps.
Or even better, use QToolBar::setIconSize(const QSize & size), it will set the icon size for the toolbar. No need to set the icon size for individual items.
/Daniel
-----
Daniel Hedberg, M.Sc., Software Engineer
MathCore Engineering AB
Teknikringen 1B, SE-583 30 Linköping, Sweden
Phone: +46 13 32 85 05, Fax: +46 13 21 27 01
http://www.mathcore.com
--
[ signature omitted ]