Results 1 to 2 of 2

Thread: Adding some padding to a button

  1. #1
    Join Date
    Jun 2010
    Location
    Cincinnati, Ohio, USA
    Posts
    92
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question Adding some padding to a button

    The layout:

    QHBoxLayout
    QLabel
    Spacer
    QPushButton

    The text in the QPushButton is three words and right now there is no padding between the word and the edge of the button. How do I add some padding? I though it was the sizeIncrement, but set to either 10 or 40, it has no effect. Any suggestions?

    Sam

  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: Adding some padding to a button


Similar Threads

  1. Adding a button in the header of a QTreeWidget
    By ioannis in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2008, 18:06
  2. QLineEdit padding
    By bunjee in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2008, 22:43
  3. Unwanted padding on QWidget
    By etru1927 in forum Qt Programming
    Replies: 4
    Last Post: 7th August 2008, 07:42
  4. Adding 3 words to Button with specified length betwwen words
    By chikkireddi in forum Qt Programming
    Replies: 1
    Last Post: 26th October 2007, 11:08
  5. QString:: Padding Zeros?
    By Harvey West in forum Qt Programming
    Replies: 2
    Last Post: 27th February 2007, 18: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.