Results 1 to 4 of 4

Thread: Can I remove / hide the border when QPushButton is highlighted / focus / active?

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Question Can I remove / hide the border when QPushButton is highlighted / focus / active?

    Hi,

    I am brand new to Qt development and I am hoping you guys might be able to help me with a GUI / Stylesheet issue.

    The issue is I am trying to remove a border which appears around a button when it becomes active on my form (white approx 1px surrounded by another grey rounded approx 2px), is there a way to remove this border?

    Further info, not sure if this helps ...

    I am using the latest version of QT on my Windows XP machine, I am running my application on my Nokia N85 and I use the D-Pad on my phone to navigate between buttons.

    I have 3 buttons on my form, I have used style sheets to remove borders and padding etc. and replace the background images to png's so they now look exactly how I want them. I have also created a section in the css for the focus state which changes the image to Image B all working as desired apart fom the border being visible when my button is highlighted.

    Thanks in advance for any pointers.

    Cheers


    Chris

  2. #2
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Can I remove / hide the border when QPushButton is highlighted / focus / active?

    same here... and no answer...

  3. #3
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Can I remove / hide the border when QPushButton is highlighted / focus / active?

    You need to write a custom style.

  4. #4
    Join Date
    Sep 2009
    Posts
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Can I remove / hide the border when QPushButton is highlighted / focus / active?

    the "outline: none" did it for me (qt 4.7, qtembedded 4.6.3)

    Qt Code:
    1. QPushButton:focus {
    2. border: none;
    3. outline: none;
    4. }
    To copy to clipboard, switch view to plain text mode 

  5. The following user says thank you to wvrneer for this useful post:

    borzh62 (12th November 2015)

Similar Threads

  1. Replies: 2
    Last Post: 21st March 2012, 14:30
  2. Replies: 0
    Last Post: 13th February 2009, 08:26
  3. Remove Widget Border?
    By winston2020 in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2008, 05:26
  4. Hide the border of a tool bar?
    By Dark_Tower in forum Qt Programming
    Replies: 6
    Last Post: 20th August 2007, 14:04
  5. Replies: 3
    Last Post: 26th September 2006, 12:16

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.