Results 1 to 4 of 4

Thread: Spacing in a dock that contains 7 buttons [resolved]

  1. #1
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Spacing in a dock that contains 7 buttons [resolved]

    Hi,


    I have a dock that contains 7 QPushButton, I want them to be a little more near the top. So, I'm trying to put a spacer with the simple fonction layout.addSpacing(30) to "push" the buttons up, whatever the real number. But, it puts space under AND above...I can have space only on the top, but not the bottom...

    Any tip??

    Thanks!!

  2. #2
    Join Date
    Aug 2008
    Posts
    45
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Spacing in a dock that contains 7 buttons

    I would recommend that you implement this using QT Designer, instead of manually coding the layout.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Spacing in a dock that contains 7 buttons

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Spacing in a dock that contains 7 buttons

    thanks for both answers!
    I tried with Qt Designer and it helped me thanks. I had already tried addStretch but it didn't work either....that was a problem with my sizePolicy...

Similar Threads

  1. [RESOLVED] Help in using private classes
    By kuzulis in forum Qt Programming
    Replies: 8
    Last Post: 27th August 2009, 15:03
  2. forcing dock windows to dock?
    By eric_vi in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2009, 16:32
  3. Replies: 2
    Last Post: 12th February 2009, 04:42
  4. Replies: 8
    Last Post: 17th April 2008, 23:38
  5. I'm a fresh,how this problem could be resolved?
    By defyer in forum Qt Programming
    Replies: 6
    Last Post: 16th July 2007, 09:04

Tags for this Thread

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.