[Qt-interest] remove the focus frame of custom qpushbutton

Ender EREL erelender at yahoo.com
Fri Feb 20 13:27:21 CET 2009


Markus Franke wrote:
> Dear Qt Developers/Users,
> 
> I have a custom pushbutton class which is derived from QPushButton. I am 
> manipulating the look&feel of the button by using stylesheets. However 
> the only thing I am not able to remove is the default focus frame which 
> is drawn by Qt when the pushbutton get's the focus. How can I achieve this?
> 
> With best regards,
> 
> Markus Franke

In the QT Style Sheets documentation, there is a pseudo-state called 
:focus. If you change QPushButton:focus{} (or YourButtonClass:focus{} ) 
in the style sheet, you should be able to achieve that.

-- 
Ender EREL



More information about the Qt-interest-old mailing list