Results 1 to 6 of 6

Thread: Dynamically creating buttons from Xml file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Dynamically creating buttons from Xml file

    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.

  2. #2
    Join Date
    Nov 2010
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Dynamically creating buttons from Xml file

    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.

  3. #3
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dynamically creating buttons from Xml file

    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.

Similar Threads

  1. problem about load resource file dynamically
    By Raul in forum Qt Programming
    Replies: 1
    Last Post: 27th August 2010, 05:56
  2. creating Xml file using QT
    By rk0747 in forum Qt Programming
    Replies: 3
    Last Post: 30th January 2010, 11:16
  3. Creating dock widget as tab dynamically
    By vidyadhar in forum Qt Programming
    Replies: 1
    Last Post: 18th July 2009, 12:03
  4. QWizard creating objects dynamically
    By afflictedd2 in forum Qt Programming
    Replies: 5
    Last Post: 24th March 2009, 15:43
  5. Replies: 1
    Last Post: 18th March 2006, 10:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.