Results 1 to 4 of 4

Thread: Qt layout space + stretch

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Qt layout space + stretch

    Hey there,

    I'd like to add a Spacer item to a QBoxLayout that also stretch.
    According to Qt documentation you can only add a stretch or a spacer.

    Any way to add both at the same time?

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt layout space + stretch

    What behavior are you trying to achieve?

  3. #3
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Qt layout space + stretch

    A stretcher with a minimum size I guess.

  4. #4
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Qt layout space + stretch

    Here is an example :

    Qt Code:
    1. getLayout().insertSpacing(index, width);
    2. getLayout().insertStretch(index, stretch);
    To copy to clipboard, switch view to plain text mode 

    I would like this
    Qt Code:
    1. getLayout().insertStretch_and_space(index, width, stretch);
    To copy to clipboard, switch view to plain text mode 

    or equivalent

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

    pakine (25th August 2010)

Similar Threads

  1. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  2. Qt Layout engine not respecting minimum size?
    By Mike in forum Qt Programming
    Replies: 2
    Last Post: 28th August 2007, 13:27
  3. Qt layout memory issue
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 25th August 2007, 17:11
  4. "dynamic" layout
    By hulk in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2006, 07:16
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.