Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Creating a GroupBox in QML
Forum Updated to NodeBB v4.3 + New Features

Creating a GroupBox in QML

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ephe
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      danimo
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved