[Qt-interest] Change the color of focus effect

Tibor Kiss tibor at wiesen.at
Mon Feb 1 23:15:26 CET 2010


Dear everyone!

I have a small but annoying problem. I would like to change to color of the
focus effect, the small rectangle around the widget who has the input focus
at the moment. In KDE there is no difficulty, you can change the color
theme, it has an option for this. But my application is not used in a KDE
environment, and the focus effect around the widget is not easy to see in
the default plastique color scheme.

Here is what I've tried already:

- Use Qt-config. There is no option to change that.

- Use QApplication::setPalette. In the ColorRole section of QPalette, there
is no role corresponding to the focus effect.

- Use QApplication::setStyleSheet. The "*:focus" gives me the right state,
but there is no property on the list for the focus effect. If I use the
"border" property, it's a little bit different and has an unwanted side
effect on the color of the background of the focused widget.

Am I skipping something in the document? The KDE can make this change
somehow...

If you know anything please share with me.

Thank you!
Tibor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100201/09cb6e6f/attachment.html 


More information about the Qt-interest-old mailing list