0

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?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Olaf Japp
  • 480
  • 5
  • 19

1 Answers1

1

Found a solution already...

doc = QDomDocument()
root = doc.createElement("Animation")
doc.appendChild(root)
stream = QTextStream(xmlfile)
doc.save(stream, 0)
Olaf Japp
  • 480
  • 5
  • 19