PDA

View Full Version : Changing properties of pushbutton?



triperzonak
19th June 2008, 08:41
i have i program that dynamically create pushbutton. It will be inserted to a gridlayout wherein my gridlayout is inserted to a groupbox.

when im intializing the size of pushbutton
pushbutton->setGeometry(QRect(n, n, n, n));and put in a gridlayout, i think it ignores it.

how can i change the size of my buttons?

then i add a border image to my button
pushbutton->setStyleSheet("border-image: url(:/background/myimage.png);"); but it became flat button plus the effects of button were gone.

how can i add images to my button without removing it effects? :confused:

jacek
23rd June 2008, 00:07
... and put in a gridlayout, i think it ignores it.

how can i change the size of my buttons?
If you put a widget in a layout, the layout controls its size. You can influence the size by changing size policies.

triperzonak
24th June 2008, 16:48
If you put a widget in a layout, the layout controls its size. You can influence the size by changing size policies.

i see.. tnx