Hello,
I want some leads to create an application, I want to dynamically create buttons from xml files
it will be great if somebody could help me on this.
Hello,
I want some leads to create an application, I want to dynamically create buttons from xml files
it will be great if somebody could help me on this.
What have you tried so far? What problems do you exactly face? And do you really think this question belongs to the Qt Programming forum? (-> Moved to newbie)
i am just a new person in QT. so dont have much of info on this.. just learning QT basics,.
I really dint know that this query has to be put in the newbie forum. I havent done much right now. i created some application which creates buttons dynamically but not from files.. so just wanted to know how it can be done.
So what informations do you have in those files? And if you are able to create buttons dynamically then have a look at QFile on how to read a file or if it is XML see QDomDocument. Then loop over the lines/tags and create the buttons.
Ya i tried creating buttons through files and dint have any problem. i wanted to know which class to use to call xml files to create controls dynamically. thanks for giving me some leads. i will have a look at the class and do some research.
there is no class which does "read an xml file and create buttons". you have to code that by yourself - nobody knows the structure of your xml file! So, you have to parse the file using suggested QDomDocument. Then, create a button if you reached a button description in the file.
Bookmarks