Results 1 to 2 of 2

Thread: can a qdockwidget be smaller than the contained widgets?

  1. #1
    Join Date
    Aug 2006
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default can a qdockwidget be smaller than the contained widgets?

    hello guys,

    i have a dockwidget, containing so many buttons. i want the size of the widget be smaller than the height of all the buttons adding up. but it seems that i'm not allowed to to that. but i did see some qt program allow the flexible adjustment of the dockwidget's height.

    but i don't know how to do that.

    i'm attaching an image, on the left, is the dockwidget i have now, the top dockwidget cannot be smaller, because of the button heights.

    on the right, there is a fake image i made to show the effect i want. i want the dockwidget to hide some buttons if they are outside the region, but it can't, it just cannot be smaller.

    better if the dockwidget can show vertical scrollbar when widgets are outside the region, but it seems that the dockwidget can only show horizontal scrallbar when the widget's width is not enough.

    thanks.
    Attached Images Attached Images

  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: can a qdockwidget be smaller than the contained widgets?

    first thought: use a QScrollArea (or use setGeometry without a layout (which is not the best solution))

Similar Threads

  1. Replies: 4
    Last Post: 2nd December 2008, 05:19

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.