Originally Posted by
high_flyer
I guess the way to go would be:
1. Scale the icons image file to the maximal size it will need. (with a graphical editing application)
2. call setIconSize() every time you change the size of the botton.
Thanks! Because I don't have a better idea too, I will do it in this way now ....
if ( event
->type
() == QEvent::Resize ) {
for ( int n = 0; n < pushButtonList.size(); ++n )
{
pushButtonList.
at(n
)->setIconSize
( QSize( pushButtonList.
at(n
)->size
().
width()-4, pushButtonList.
at(n
)->size
().
height()-6 ));
}
....
if ( event->type() == QEvent::Resize )
{
for ( int n = 0; n < pushButtonList.size(); ++n )
{
pushButtonList.at(n)->setIconSize( QSize( pushButtonList.at(n)->size().width()-4, pushButtonList.at(n)->size().height()-6 ));
}
....
To copy to clipboard, switch view to plain text mode
Thanks agai for giving me this idea ...
Bookmarks