Results 1 to 7 of 7

Thread: How to expand QDockWidget as main window grows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to expand QDockWidget as main window grows

    I'm using Qt 4.4.3 and Designer. I am trying to get a QDockWidget to resize automatically both horizontally and vertically (it does resize automatically vertically) as the user changes the main window size by dragging, as opposed to the user having to enlarge the dock widget via the splitter. A simplified example of the layout is attached.

    I tried implementing resizeEvent() for the main window and resizing the dock widget to account for horizontal growth when it is called, but the dock widget's width seems to be "stuck". (I also tried this with setSizeConstraint(QLayout::SetNoConstraint).)

    Are there other properties that need to be changed, or is another approach (e.g. a custom layout) necessary?

    Thanks in advance,
    Martin
    Attached Images Attached Images

Similar Threads

  1. access main window from function
    By eric in forum Qt Programming
    Replies: 6
    Last Post: 19th January 2008, 21:29
  2. minimizing main window
    By eric in forum Qt Programming
    Replies: 4
    Last Post: 28th November 2007, 16:54
  3. Background image for main window widget using css.
    By Enygma in forum Qt Programming
    Replies: 8
    Last Post: 23rd August 2007, 15:40
  4. Replies: 5
    Last Post: 4th August 2006, 23:44
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.