Results 1 to 2 of 2

Thread: Some problems when managing QDockWidgets

  1. #1
    Join Date
    Jan 2006
    Posts
    52
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Some problems when managing QDockWidgets

    I have a couple of QDockWidgets arranged in a single QMainWindow. The problems I'm seeing are thus:

    1. When I add a QDockWidget to the right with no central widget set it automatically resize itself and takes all the available space. I want it to take only some percentage of the window and no more. Unfortunately QDockWidget ignore size hints set on its contained widget (which includes a few buttons arranged in a QVBoxLayout).

    2. When I add another QDockWidget, the available space is distributed evenly between them. One of them, though, is horizontal in nature and doesn't need all that space. I'm trying to tell QMainWindow to expand only the other QDockWidget, but I don't know exactly how.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Some problems when managing QDockWidgets

    1: set a empty widget as a central widget till you set the real one. just a place holder. also you can set the with of your dock widget using setMaximumWith.
    2: play around with size hints and sizes for the dock widgets (which are normal QWidgets after all...)

Similar Threads

  1. Selecting tabbed QDockwidgets
    By trskel in forum Qt Programming
    Replies: 3
    Last Post: 25th September 2007, 17:22
  2. managing workerthreads
    By darksaga in forum Qt Programming
    Replies: 4
    Last Post: 20th August 2007, 18:26
  3. QDockWidgets without central widget
    By JoeMerchant in forum Qt Programming
    Replies: 17
    Last Post: 8th August 2007, 14:52
  4. centralWidget and QDockWidgets in designer
    By momesana in forum Qt Tools
    Replies: 1
    Last Post: 18th December 2006, 11:56
  5. QDockWidget dockable with other QDockwidgets
    By fellobo in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2006, 10:06

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.