UI expnader component
-
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 -
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?!
@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
-
You can do it like this:
Rectangle { implicitHeight: header.implicitHeight + (collapsed ? listview.contentHeight : 0) Item {} // header Listview {} }
@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.