<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">can anyone explain why tree view looks fine but  table view only has 1 pixel?<div class=""><br class=""></div><div class="">@adam did you download the example project? it's trivial to run and you can test several implementations.  which impl would be used with your suggestion of PM_FocusFrame margins?</div><div class="">and do you have maybe example code to implement your suggestion?  </div><div class=""><br class=""></div><div class="">part of my question is: is this a bug in Qt ? because IMHO "QFocusFrame" should "just work", and why does it NOT?</div><div class=""><br class=""></div><div class="">or setting the style to 3 px should "just work" and why does it NOT work but only for certain widgets?</div><div class=""><br class=""></div><div class="">you'd think that QFocusFrame would *manage* the clipping properly?</div><div class=""><br class=""></div><div class="">or the doc should be more clear, with sample code, cuz i've read the doc several times and am no further along :(</div><div class=""><br class=""></div><div class="">any help would be greatly appreciated!  if you like karaoke, i have an app for you ;-)</div><div class=""><br class=""></div><div class="">-dave<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 8, 2020, at 5:18 AM, Adam Light <<a href="mailto:aclight@gmail.com" class="">aclight@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">On Sun, Jun 7, 2020 at 2:21 PM David M. Cotter <<a href="mailto:dave@kjams.com" class="">dave@kjams.com</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">i have an example project (see below), that tries 6 different 
implementations, attempts to make the focus ring 3 pix wide. None of 
them work on windows, and only one of them PARTIALLY works on mac. What i
 want is the style you get around a text edit on mac, but i want that 
style on ALL widgets, and i want it on windows too.<br class="">
<br class="">
anyone have any idea how i can accomplish this?<br class=""></div></blockquote><div class=""><br class=""></div><div class="">It might be as simple as returning a different value for QStyle::PM_FocusFrameHMargin and QStyle::PM_FocusFrameVMargin in a QStyle::pixelMetric or QProxyStyle::pixelMetric implementaton. If you're using one of the standard styles then it's pretty simple to create and use a QProxyStyle class to tweak pixel metrics and other aspects of the style.</div><div class=""><br class=""></div><div class="">If that doesn't work you may be able to reimplement Q[Proxy]Style::drawControl for element QStyle::CE_FocusFrame and handle the drawing of the focus frame itself.</div><div class=""><br class=""></div><div class="">One thing to watch out for is that making QStyle::PM_FocusFrameHMargin and QStyle::PM_FocusFrameVMargin larger than default can result in the focus frame getting clipped in some situations. We see this using persistent editors in itemviews sometimes, and I think we also sometimes see this when certain widgets are in splitters.</div><div class=""><br class=""></div><div class="">Adam</div></div></div></div></blockquote></div><br class=""></div></body></html>