[closed]Rean an xml and create checkboxes



  • 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?



  • 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.



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.