You can use something like the following for only the button with the object
name (mybutton):
QPushButton#mybutton {
border: 2px solid gray;
border-radius: 3px;
}
In the code you must use:
pButton->setObjectName("mybutton");
But I recommend that you have a look on QStyle.
Best Regards
Am 23.02.2012 um 13:16 schrieb Николай Шатохин <[email protected]>:
> So, If I change StyleSheet of CentralWidget then I must change StyleSheets of
> all children Widgets? So, is it possible to see default stylesheets of
> widgets? What stylesheet do I must to set to create button with rounded
> corners and different pictures on click, mouse over, selection, normal and
> disabled states? And how can I turn off ugly pink selection?
>
> 2012/2/23 <[email protected]>
> This isn't possible. I know there where a hack/workaround but this doesn't
> work either.
>
> Best Regards
>
> Am 23.02.2012 um 12:14 schrieb Николай Шатохин <[email protected]>:
>
> > Hello.
> >
> > When I set custom StyleSheet in CentralWidget or MainWindow, all children
> > widgets and elements lost their default StyleSheets. How to keep default
> > StyleSheets in cheldren elements? And how to disable ugly pink selection in
> > buttons when I change it StyleSheets?
> >
> > Best regards,
> > Nick
> > _______________________________________________
> > Interest mailing list
> > [email protected]
> > http://lists.qt-project.org/mailman/listinfo/interest
>
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest