How to use QTextStream with PythonQT?

514 Views Asked by At

I am writing a plugin for a Qt desktop app using PythonQT. I wonder how to use << operator in python.

QTextStream stream(&file);
stream << doc.toString();

Any hints? How may I ask Python to list all methods for a given class like QTextStream? Or is there another way in Python to write a QDomDocument to a QFile?

1

There are 1 best solutions below

0
Olaf Japp On

Found a solution already...

doc = QDomDocument()
root = doc.createElement("Animation")
doc.appendChild(root)
stream = QTextStream(xmlfile)
doc.save(stream, 0)