Results 1 to 2 of 2

Thread: How to show QPushButton as flat when it is checked

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default How to show QPushButton as flat when it is checked

    Hi

    I m using QPushButton in my Application. I have set the Button's property setFlat(true) and setCheckable(true). Whenever I checked the QPushButton its Boundry showing means it doesn't show as flat.

    My requirement is that when I pressed or Checked Button should show as flat, its boundry will not show. If anybody know this issues kindly tell me..


    Attached Image show the Boundry of button when checked. I donot want the Boundry of PushButton when it is Pressed or Checked.

    Thanks
    Santosh Kumar Singh
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2008
    Posts
    52
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to show QPushButton as flat when it is checked

    Hi santosh,
    For QPushButton you should set the style sheet,that time you will get flat button.
    Qt Code:
    1. pushbutton Objectname->setStylesheet{ QPushButton:flat { border: none; }}
    To copy to clipboard, switch view to plain text mode 


    Thanks&Regards,
    Tavit.

Similar Threads

  1. Replies: 3
    Last Post: 17th March 2010, 16:47
  2. hierarchical model in a flat view
    By gniking in forum Qt Programming
    Replies: 4
    Last Post: 10th November 2009, 20:17
  3. QPushButton - Only show the Icon
    By graciano in forum Newbie
    Replies: 9
    Last Post: 19th September 2009, 21:15
  4. Flat Icon in a QToolBar
    By schall_l in forum Qt Programming
    Replies: 8
    Last Post: 23rd June 2009, 09:31
  5. QPushbutton Flat property and icon appearance.
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 4th November 2006, 08:30

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.