Results 1 to 2 of 2

Thread: QDockWidget initial size

Threaded View

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

    Question QDockWidget initial size

    Hi,

    I use Qt Designer and try to set the initial size of a QDockWidget... but no way.

    I have try the following :

    - Change the sizes with the Qt Designer, it the designer it looks good but not when I launch the application.
    - Play with the following methods : resize, updateGeometry, setGeometry, raise
    - Implement sizeHint this way :
    virtual QSize sizeHint() const
    {
    return QSize(247, 241);
    }

    Of course, I have try on both the QDockWidget and the child widget !

    Only the setFixedWidth works... but then the width is fixed :-P

    What is strange is that the 'window::restoreState' update the layout correctly !

    Thanks
    Last edited by pl01; 22nd March 2013 at 09:55.

Similar Threads

  1. initial size of widgets in a QSplitter
    By momesana in forum Newbie
    Replies: 3
    Last Post: 12th July 2012, 15:41
  2. initial size of docked window
    By GrahamLabdon in forum Newbie
    Replies: 3
    Last Post: 28th February 2011, 15:33
  3. Replies: 2
    Last Post: 16th April 2010, 23:55
  4. Adjust the initial size of a QTextEdit in a layout
    By hecinho in forum Qt Programming
    Replies: 0
    Last Post: 26th November 2009, 15:58
  5. How to set initial QDockWidget's size?
    By rajesh in forum Qt Programming
    Replies: 4
    Last Post: 16th November 2006, 15:49

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.