PDA

View Full Version : Non quadrangular PushBotton Icon



Rhian
3rd July 2015, 15:57
I wanted to use a jpg as a pushbutton. However, the picture is always quadrangular.
Is it possible to customize the size and make it rectengular?



ui.pushButton->setIcon(QIcon(QPixmap("pic.jpg")));


This only makes the icon smaller:


ui.pushButton->setIconSize(QSize(100, 250));


Thanks for help.

ChrisW67
3rd July 2015, 21:32
A rectangle is a quadrangle

I think you want a button where the entire face is an image. Have a look at QToolButton.