Hi everyone,


I am using "QDomDocument" class to create XML out of my database having more than 5 lakh records. Following is the code I am using to achieve this:-

Qt Code:
  1. QDomDocument XMLdoc;
  2. //Put all the records inside XMLdoc
  3. QByteArray XmlByte = XMLdoc.toByteArray(); //Here is where I am facing the problem
To copy to clipboard, switch view to plain text mode 

So the issue is if my database has less than 5 lakh records (say 3 lakh), then "XMLdoc.toByteArray()" is completely fine.
But if my database has >= 5 lakh records, then "XMLdoc.toByteArray()" hangs. I am not able to figure out how to solve this. Is this due to some memory issue or something?