[Qt-interest] Re : can a qdockwidget be smaller that the contained widgets?

BOUCARD Olivier boucard_olivier at yahoo.fr
Fri Nov 13 20:05:14 CET 2009


Hi,

Why you don't just put your buttons inside a QScrollArea?




________________________________
De : Shi Yan <billconan at gmail.com>
À : qt-interest at trolltech.com
Envoyé le : Ven 13 Novembre 2009, 19 h 57 min 04 s
Objet : [Qt-interest] can a qdockwidget be smaller that 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.

the image can be seen here
http://www.qtcentre.org/forum/f-qt-programming-2/t-can-a-qdockwidget-be-smaller-than-the-contained-widgets-25657-post122568.html#post122568
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091113/9369601e/attachment.html 


More information about the Qt-interest-old mailing list