Results 1 to 5 of 5

Thread: Custom buttons using style sheets

  1. #1
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default Custom buttons using style sheets

    Hi all
    How would one create a round push button using style sheets?
    Thanks

  2. #2
    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: Custom buttons using style sheets

    Read the docs! There is an example of how you can make round edges. If you set this radius to (height of the button)/2 you have a round button.

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

    GrahamLabdon (22nd March 2010)

  4. #3
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Custom buttons using style sheets

    How about ...try a round icon (background transparent) on the button and then apply this on the styleshhet:
    Qt Code:
    1. QPushButton {border-style: outset; border-width: 0px;}
    To copy to clipboard, switch view to plain text mode 

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

    GrahamLabdon (22nd March 2010)

  6. #4
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Custom buttons using style sheets

    Thank you!!

  7. #5

    Default Re: Custom buttons using style sheets

    You can create a cool pretty good navigation rounded menu, without images and without Javascript, and effectively use new features of CSS3 border-radius and animation. This is very easy to implement.

Similar Threads

  1. Do Qt Style Sheets support List-style-image?
    By daiheitan in forum Qt Programming
    Replies: 6
    Last Post: 12th March 2010, 02:41
  2. style sheets
    By alisami in forum Qt Programming
    Replies: 8
    Last Post: 7th May 2009, 10:41
  3. style sheets select all except something
    By codeslicer in forum Qt Programming
    Replies: 4
    Last Post: 6th March 2008, 01:21
  4. Qt style sheets
    By locus in forum Qt Programming
    Replies: 5
    Last Post: 5th April 2007, 18:03
  5. style sheets
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2007, 16:14

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.