Results 1 to 2 of 2

Thread: How to get rid of this QRadioButton's border?

  1. #1
    Join Date
    Oct 2010
    Posts
    5
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to get rid of this QRadioButton's border?

    Scr000007.jpg

    This is a screenshot of Qt's example stylesheet. The rectangle appears when I click on a QRadioButton. It doesn't seem like a border since setting border= none returns the same result. Could anybody give me any help or hint on how to remove it please?

    Scr000003.jpg
    Also if there was no custom styles, the radio button's text gets blocked when I click on it.

    The same thing happens for QCheckBox as well.

    Thanks in advance.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to get rid of this QRadioButton's border?

    This rectangle marks that the button has focus. One way to get rid of it is to set the widget's focus policy to NoFocus. You can probably do it through stylesheets too but you have to find the right syntax yourself.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    mying (20th January 2011)

Similar Threads

  1. QRadioButton and QDataWidgetMapper
    By SimonSchmeisser in forum Qt Programming
    Replies: 3
    Last Post: 24th June 2015, 15:28
  2. Replies: 2
    Last Post: 21st March 2012, 14:30
  3. Unchecking QRadioButton
    By gruszczy in forum Qt Programming
    Replies: 3
    Last Post: 26th February 2008, 00:55
  4. QRadioButton
    By sonuani in forum Newbie
    Replies: 1
    Last Post: 20th February 2008, 09:30
  5. QRadioButton
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 8th October 2007, 07:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.