Results 1 to 2 of 2

Thread: Expanding QLabel

  1. #1
    Join Date
    Aug 2008
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Expanding QLabel

    I have a QVBoxLayout into which I add things qlineEdit and buttons. These will then space themselves out nicely. However the QLabel does no do this, it takes up as much space as possible and squeezes the rest together. I would like it to behave like the other widgets.

    so a layout like

    _


    _


    _

    turns into


    label


    _
    _
    _



    Beautiful illustration. Anyhow really need help on this

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Expanding QLabel

    if the other widgets need more space: set a minimum size, or a size policy;
    if you want to limit the QLabel: set a maximum size and/or size policy

Similar Threads

  1. Trouble with QLabel
    By dany_MB in forum Newbie
    Replies: 3
    Last Post: 14th August 2009, 08:21
  2. Replies: 3
    Last Post: 17th July 2008, 07:43
  3. QLabel ScaledContents ignored by style sheet?
    By WinchellChung in forum Newbie
    Replies: 3
    Last Post: 27th February 2008, 14:50
  4. QLabel size policy
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 7th December 2007, 17:57
  5. QScrollArea display custom QLabel
    By spawnwj in forum Qt Programming
    Replies: 6
    Last Post: 6th December 2006, 03:38

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.