Results 1 to 4 of 4

Thread: How to get rid of red outline on button last clicked?

  1. #1
    Join Date
    Jan 2013
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to get rid of red outline on button last clicked?

    Hi All,

    I have some custom round qpushbuttons that look great until you click on them. Then I'm getting an ugly red shaded square showing that it's the last button clicked. How do I keep that square from appearing?

    Thanks,
    Brian Keeney

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: How to get rid of red outline on button last clicked?

    Hi,

    Could you please show some code? Particularly the part you draw the QPushButton(i.e. paintEvent(...) method). Did you handle the style when the button is pressed?

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to get rid of red outline on button last clicked?

    It is the focus rect - I guess. Try to use our search function and you will find this question asked multiple times.

  4. The following user says thank you to Lykurg for this useful post:

    briankeeney (23rd January 2013)

  5. #4
    Join Date
    Jan 2013
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to get rid of red outline on button last clicked?

    Thanks guys! The solution turns out to be a menu item in the qpushbutton-- set focus: no focus.

Similar Threads

  1. How to checked if button is clicked
    By stbb24 in forum Newbie
    Replies: 3
    Last Post: 5th June 2012, 06:04
  2. Capture all button clicked from a widget
    By alnorte in forum Qt Programming
    Replies: 5
    Last Post: 20th April 2012, 14:31
  3. Gui hangs when close button is clicked
    By Tanny007 in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2012, 05:10
  4. How can find which button is clicked.
    By Niamita in forum Qt Programming
    Replies: 5
    Last Post: 27th June 2011, 14:35
  5. How to get the clicked button handle?
    By Gokulnathvc in forum Newbie
    Replies: 1
    Last Post: 27th April 2011, 08:06

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.