UI expnader component
-
wrote on 23 May 2016, 07:26 last edited by
Is there any UI component which is like 'Expander'? (refer below)
collapse and expand component http://www.wpftutorial.net/Expander.html -
Is there any UI component which is like 'Expander'? (refer below)
collapse and expand component http://www.wpftutorial.net/Expander.html@Jehyeok
search in google for "qml collapsible" and you will find some examples -
wrote on 11 Jul 2016, 09:50 last edited by Jehyeok 7 Nov 2016, 10:11
Sorry @raven-worx , I couldn't find right references.
Actually
I try to use 'Loader' to make similar putting Component or null in sourceComponent property.Loader { id: itemLoader anchors.fill: parent visible: !collapsed sourceComponent: collapsed ? null : componentItem }
But, I don't think it is best. Because I need to put component in it still.
MyExpander{ componentItem: Component{ Rectangle{ Text { } } }
It would be nice to design as other layout components to hold children in it.
Do you have any idea?GridLayout{ Rectangle{ Text { } } }
-
Sorry @raven-worx , I couldn't find right references.
Actually
I try to use 'Loader' to make similar putting Component or null in sourceComponent property.Loader { id: itemLoader anchors.fill: parent visible: !collapsed sourceComponent: collapsed ? null : componentItem }
But, I don't think it is best. Because I need to put component in it still.
MyExpander{ componentItem: Component{ Rectangle{ Text { } } }
It would be nice to design as other layout components to hold children in it.
Do you have any idea?GridLayout{ Rectangle{ Text { } } }
@Jehyeok said:
Sorry @raven-worx , I don't get any reference from your keyword in google.
come on... do you want me really to believe that?!
-
@Jehyeok said:
Sorry @raven-worx , I don't get any reference from your keyword in google.
come on... do you want me really to believe that?!
wrote on 11 Jul 2016, 10:11 last edited by@raven-worx You are right. I saw them in search results, but I mean it wasn't what I want. I want to have similar like groupbox component. http://doc.qt.io/qt-5/qml-qtquick-controls-groupbox.html
-
wrote on 11 Jul 2016, 15:43 last edited by
You can do it like this:
Rectangle { implicitHeight: header.implicitHeight + (collapsed ? listview.contentHeight : 0) Item {} // header Listview {} }
-
You can do it like this:
Rectangle { implicitHeight: header.implicitHeight + (collapsed ? listview.contentHeight : 0) Item {} // header Listview {} }
wrote on 12 Jul 2016, 07:10 last edited by Jehyeok 7 Dec 2016, 07:10@literA2
I would like to do it like thisMyExpander{ GridLayout{ Rectangle{ Text { } Text { } } Rectangle{ Text { } Text { } } } }
MyExpander is my new component. I would like to reuse this MyExpander object in other qml.
Under the MyExpander should be able to control its children collapsible.