[Qt-interest] [Solved] get rid if focus rect of widgets on mac

Andrei Cimpean andreiamenta at gmail.com
Mon May 10 21:44:24 CEST 2010


I found the solution in an example; just had to add 

    this->setAttribute(Qt::WA_MacShowFocusRect,false);

in the class for my view.
Thanks for the help.

Begin forwarded message:

> From: Andrei Cimpean <andreiamenta at gmail.com>
> Date: May 10, 2010 10:31:37 PM GMT+03:00
> To: Nikos Chantziaras <realnc at arcor.de>
> Subject: Re: [Qt-interest] get rid if focus rect of widgets on mac
> 
> Thanks for helping Nikos but unfortunately your suggestion doesn't work(just tested it).
> 
> On May 10, 2010, at 10:14 PM, Nikos Chantziaras wrote:
> 
>> On 05/10/2010 09:57 PM, Andrei Cimpean wrote:
>>> Hello everybody. I am having some interface problems with a program on macs. Don't know why but it always draws a blue border when a widget gets focus and I have no idea how to get rid of that.
>>> I searched for fixes using the power of google but kind off failed to achieve something.  I found a few moments ago this post http://stackoverflow.com/questions/1987546/qt4-stylesheets-and-focus-rect but the working tip is unusable ->  ( tree.setAttribute(Qt.WA_MacShowFocusRect, 0) ) and the other suggestion, a long one with delegates seems really dumb and long. Isn't there a simple way to achieve what i'm searching for?
>> 
>> setFrameStyle(QFrame::NoFrame | QFrame::Plain);
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100510/7d3030f9/attachment.html 


More information about the Qt-interest-old mailing list