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. [closed]Rean an xml and create checkboxes

[closed]Rean an xml and create checkboxes

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.3k Views
  • 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.
  • A Offline
    A Offline
    annatz
    wrote on last edited by
    #1

    Hi,

    I have created some checkboxes with some examinations.

    @checkbox1 = new QCheckBox("Geniki Aimatos", this);
    checkbox2 = new QCheckBox("UREA", this);
    checkbox3 = new QCheckBox("CREA", this);@

    but i want to change my code and read the examinations from an xml file. the xml may change in the future.It may be bigger.
    So how can i create the checkboxes? each checkbox should have a different name. if i count the examinations of the file, how can i define the checkboxes?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      Use QXmlStreamReader to read the XML, create QCheckBoxes on the fly and add them to a layout, for example a QVBoxLayout to have them aligned properly. Use setObjectName() to associate a unique identifier with each checkbox.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        Closed.
        Annatz, you have opened more than enough topics on this application of yours and the XML file reading & writing that comes with it now.

        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