Andrew,
The add-on that I created is working well. There is one thing I was not able to accomplish that needs to be done. Right now, the only data that is opened in the QT widget dialog is the last data set entered. I would like the ability to select any prior XML file to populate the widget for changes and a subsequent save.
Are there any examples within the program that do this? The code is currently using the combination createWidget() / restoreState(). I would need code after the creation to open the selected XML and populate the UI dialog with it.
Any help would be appreciated. Thank you,
Lori
Repopulate QT Widget based on XML File
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 84
- Joined: Sat Nov 03, 2012 2:00 am
Re: Repopulate QT Widget based on XML File
saveState / restoreState uses the configuration file to save the contents of a widget.
To read the data from an XML file (e.g. to fill in the GUI components accordingly), you'd have to use QXmlSimpleReader.
To read the data from an XML file (e.g. to fill in the GUI components accordingly), you'd have to use QXmlSimpleReader.
-
- Full Member
- Posts: 84
- Joined: Sat Nov 03, 2012 2:00 am
Re: Repopulate QT Widget based on XML File
Thank you.