Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Gui Advice/Opinion many check boxes
Forum Updated to NodeBB v4.3 + New Features

Gui Advice/Opinion many check boxes

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 809 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.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

    Hi
    As part of my application the user needs to be able to select from a set of up to 64 options.
    Any combination is allowed and I need a method of selecting/de-selecting all of the options. As a starting point I am showing (up to) 64 check boxes but by default these are 'ticked' which does not look particularly pleasing.

    Has anyone got any ideas on how best to implement this?

    Thanks

    G

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      If the list is not fixed, or if you feel like it, you can implement your settings as a QListView/ QListWidget. Items in that view can be checked (you need to set QListWidgetItem::setChecked() for the checkbox to appear) and are easy to iterate through (since you have a list of items, it's quite easy to loop through it and select/ deselect them).

      Other option is to create a standard UI layout with QCheckBoxes. You can also keep them in a QList<QCheckBox *> for convenience (should make selection/ deselection easier), or use QWidget::findChildren<QCheckBox *>().

      (Z(:^

      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