Results 1 to 3 of 3

Thread: QDockWidget default size ?

  1. #1
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QDockWidget default size ?

    Hi,

    I have put a graphic view and 2 dock widgets in my window. The problem is that the default width of the dock widget is very small.

    I would like to force an initial width (not a minimum width !!!)

    Does someone can tell me how to do this ?

    Thx

  2. #2
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDockWidget default size ?

    QDockWidget automatically resizes based on its content widget, that you set with setWidget() - http://doc.qt.nokia.com/latest/qdock...html#setWidget.

    If you still want to control its size, use QWidget::resize(int w, int h) - http://doc.qt.nokia.com/latest/qwidget.html#size-prop
    [WIKI]Building Qt on Windows CE[/WIKI]

  3. #3
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Re: QDockWidget default size ?

    Thanks,

    In the designer the dock widget has a default width of 80, it is strange that we cannot change this !

    Also, normally the child widgets should be resized based on the size of the dock widget... and not the inverse ! I have play with several docking control VC, WPF, ... and it was always like this !

    So, why here it is the inverse ?

    Also, I don't want to have a fixed(or minimum) size for childs widgets, I want that they follow the size of the dock widget ! Finally the problem is the same.

    The solution is to change this by code at runtime... maybe... but it is strange that it is not a parameter in the designer !

Similar Threads

  1. Replies: 6
    Last Post: 27th August 2012, 23:44
  2. Replies: 5
    Last Post: 30th November 2010, 06:40
  3. QDockWidget size
    By user in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2009, 20:35
  4. Default size of a QListWidget inside a QDockWidget
    By rakuco in forum Qt Programming
    Replies: 0
    Last Post: 25th July 2007, 08:01
  5. different arrangement of QDockWidget than default
    By Wurgl in forum Qt Programming
    Replies: 3
    Last Post: 13th July 2006, 10:41

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.