PDA

View Full Version : QPushButton frame style



Nippler
30th April 2008, 09:40
Is it possible to make the frame of a push button "sunken" (inset in stylesheet)?
I tried around with setting stylesheet but without any success.

If there is no solution I have to take a lable which I event filter but I don't like this.

Nippler

aamer4yu
30th April 2008, 10:13
Yes thers a way,,,,
QPushButton
{
border-style: inset;
}


but for this to work, u need to set the following code -
myButton->setFrameStyle(Qt::StyledPanel);

hope this helps :)

Nippler
2nd May 2008, 07:21
Thanks for the answer but I can't find a methode "setFrameStyle" from QPushButton?!

aamer4yu
2nd May 2008, 15:04
sorry, framestyle is used with QLabel

just try using border-style: inset;
in the stylesheet

ragha4u
5th November 2010, 12:10
ui->male_button->setFlat(TRUE);

ui->male_button->setStyleSheet("* { background-color: rgba(0,125,0,0) }");