Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
dump widgets on screen to xml
I am searching to find a way to output an xml representation of all of the widgets on the current screen. I have pondered two options so far:
1. Manually build a QDomEntity as I build the screens and then write this to an outfile using save.
This seems tedious and I was hoping to make this "dump" function less intrusive to the code.
2. Use something like KDE's UI Recovery Toolkit which takes code and recreates .ui (XML) files.
I would prefer not to use a third party solution and only want the XML for the current visible screen and not the entire application.
Does anyone have a better idea or solution to doing this?
Thanks!
RE: dump widgets on screen to xml
asparrel,
You could use the QApplication::allWidgets() to obtain a list, but you would have to parse that list for each widget and obtain the properties and whatever else interests you and push them to an xml format.
Hope this helps.
Junior
RE: dump widgets on screen to xml
I pursued this route but realized that I need to know about the widgets from QDialogs rather than QApplications. Not all of our QDialogs are associated with QApplications. Any ideas for a similar function to QApplication::allWidgets for QDialogs?
Thanks!