[Interest] how to get 3 pixel focus ring?

David M. Cotter dave at kjams.com
Tue Jun 9 05:38:29 CEST 2020

this is an enlightening conversation, so thanks for chiming in....

> One thing to be aware of when using QMacStyle or QWindowsStyle
well, but, see, i don't want to use those

i want to use stylesheets, like this:

"::focus { border: 3px solid #color }"

not related to mac or windows

and this is in fact what kTest_PARENT_STYLE is using

my question is: wouldn't you expect that to work fine on BOTH widgets (tree and table) and NOT JUST ONE? (on mac)

is this, in fact, a bug?

> On Windows, when I ran your test, it looks like you are getting the standard Windows dotted-line focus ring. Usually it's a bit inset from the edges of the edit box, though. Once again, QWindowsStyle is giving you the Windows look, and that's it

and for windows, is there a method i can use such that the "3px" is not ignored (it's always set to 1px regardless of the value i set)

is that a bug too?

do you mean QWindowsStyle is like some kindof default that's going on under the hood that overrides my "3px" setting?

is there ANY way i can maybe with a custom QFrame or QWidget maybe draw a custom border like i'm using for kTest_PARENT_STYLE instead of using style sheet, just literally custom draw it? maybe that would be the quickest route to my goal.

(again i'm not here to get feedback on the WORTHINESS of my goal, just for technical details on how to achieve it, thanks)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200608/df71c1c5/attachment.html>

More information about the Interest mailing list