Results 1 to 2 of 2

Thread: Central Widget Max Height

  1. #1
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Central Widget Max Height

    Hi,
    how I can fix a maximum height of a QMainWindow central widget?
    I have a QMainWindow including QDockWidgets top the central widget, like the following layout, and I want that my custom widget (setted as central widget) has an max Height like 50 pixels:

    layout.JPG

    Obviously I try to use the setMaximumHeight function on the central widget but without results?
    Any idea?

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Central Widget Max Height

    try using setMaximumHeight AND setSizePolicies
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Replies: 8
    Last Post: 28th June 2011, 14:57
  2. Qt Designer About central widget in Qt Designer
    By lrjdragon in forum Qt Tools
    Replies: 2
    Last Post: 3rd April 2010, 16:11
  3. QDockWidgets without central widget
    By JoeMerchant in forum Qt Programming
    Replies: 17
    Last Post: 8th August 2007, 14:52
  4. paint central widget of a QMainWindow???
    By Shuchi Agrawal in forum Newbie
    Replies: 3
    Last Post: 17th January 2007, 08:02
  5. Central Widget of QMainWindow
    By sumsin in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2006, 18:32

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.