Results 1 to 2 of 2

Thread: Fixed-height layout question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Fixed-height layout question

    You just need to set the Vertical Stretch (in Property-Editor QWidget.sizePolicy.Vertical Stretch) of your custom-Widget to 1, and the one of your QHBoxLayout to 0.

    Stretch: http://doc.trolltech.com/4.6/layout....tretch-factors . The remaining available space is divided proportional to the stretchfactors.

    Then you should also use a QVBoxLayout, as in your case the SpinBoxCell should never get a bigger height, and thus the user shall not be able to change it by means of a splitter.

    HIH

    Johannes

  2. The following user says thank you to JohannesMunk for this useful post:

    TheJim01 (22nd March 2010)

Similar Threads

  1. Layout question (Twitter-client-like app)
    By piotrj in forum Newbie
    Replies: 1
    Last Post: 10th January 2010, 08:47
  2. QWidget with fixed width height ratio
    By Lodorot in forum Qt Programming
    Replies: 1
    Last Post: 26th May 2009, 08:49
  3. A question about adding to layout
    By Cruz in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2009, 12:41
  4. Replies: 3
    Last Post: 4th April 2008, 19:51
  5. simple thread layout question
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 12th August 2006, 11:02

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
  •  
Qt is a trademark of The Qt Company.