Looking for a Qt widget similar to stack panel in functionality
-
Hello everyone,
I am new to Qt and I was wondering if there is a user control in Qt similar to the Stack panel in Silverlight? I searched around and the closest I found was the SplitView element but it doesn't do what I need. Basically, I have few elements that are placed in a column. Some of these elements expand vertically when activated. When this happens, I need the other widgets to be pushed down automatically instead of getting covered by the newly expanded control. In Silverlight, it was as easy as stacking these elements in a stack panel that dynamically expand and contract when the height of the children elements within grow and shrink respectively. I will appreciate if anyone can point me in the right direction.
Thanks,
-
I dont know about Silver Slight, Perhaps you are looking for something like "this":http://qt-project.org/doc/qt-5.0/qtwidgets/qstackedwidget.html
-
Hi,
Are you working with widgets or Qt Quick? For widgets, I'd start with "QVBoxLayout":http://qt-project.org/doc/qt-5.1/qtwidgets/qvboxlayout.html. For Qt Quick, start with "ColumnLayout":http://qt-project.org/doc/qt-5.1/qtquicklayouts/qml-qtquick-layouts1-columnlayout.html
Layouts automatically position (and stretch, if applicable) their child elements relative to each other.
-
What about "QToolBox":http://qt-project.org/doc/qt-5.1/qtwidgets/qtoolbox.html ?
-
[quote author="dasun" date="1382943969"]What about "QToolBox":http://qt-project.org/doc/qt-5.1/qtwidgets/qtoolbox.html ?[/quote]Good one; I can't believe I've never noticed this class!
-
Thank you all for your prompt and helpful suggestions. I think the QToolBox is what I need to address my problem. I am using Qt Creator so I add my voice to dasun:
[quote author="dasun" date="1382945555"]It would be nice to have QToolBox like component in Qt Quick Component without writing something my self as you pointed out. :)[/quote]
Cheers,