Writing XML using QDomElement??



  • Hello Everyone,
    I am trying to write XML by using QDomElement. I have some QGraphicsitem on my scene window and by reading that QGraphicsitem from scene I am writing XML accordingly.
    Now the problem is: on the scene, in a rectangular box, I have two circles as graphicsitem and further these circles has 3 more children (for each circle item). Now, I want to create a QDomElement name "tuple" and inside of this "tuple" element one element from one circle item and other element from another circle item.... I hope you guys understand what I try to say for example,

    <tuple>
    <set-element>                          ........................
    <value>any value</value> ................................
    </set-element> ........     this belongs to one circle item
    <set-element>..........................
    <value>anyvalue </value>................
    </set-element>..............this belongs to another circle item
    </tuple>
    

    like above it must create 3 tuples element set which contact pair of element from each circle items

    Many Thanks in advance


  • Lifetime Qt Champion

    Hi,

    Since you have custom graphics item, you should add a method to them so they can generate the xml you need directly from them.


Log in to reply
 

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