Creating a GroupBox in QML
-
I would like to create GroupBoxes like this:
!http://dl.dropbox.com/u/2346027/groupbox.png(GroupBox)!I would like to add different kinds of fields in the boxes, like text fields, checkboxes,...
They should also be dynamic, for example there is only one row with an unselected checkbox, but when it gets checked, some other fields should be added to the group.
I want to reuse the group boxes, so that every time I need one I can add the fields I want to add.I thought that the ListView would be a good approach to realise GroupBoxes like that, but I haven't found out how I can customize it so that it looks like in the picture.
Is there someone who has another idea how to implement this or is there already an example for this (sorry if I haven't found it myself if there is one)?
Thank you!
-
Use a repeater element. To do the roundings, add check the index attached property in your delegate for whether index == 0 (first element) or index == count (last element) and adjust your box properties / background image accordingly for this case.