我正在写一个使用PythonQT的Qt桌面应用的插件。我想知道如何在python中使用<<运算符。
QTextStream stream(&file);
stream << doc.toString();有什么提示吗?如何让Python列出给定类(如QTextStream )的所有方法?或者,在Python语言中还有其他方法可以将QDomDocument写到QFile中吗?
发布于 2017-06-08 01:26:16
已经找到了解决方案...
doc = QDomDocument()
root = doc.createElement("Animation")
doc.appendChild(root)
stream = QTextStream(xmlfile)
doc.save(stream, 0)https://stackoverflow.com/questions/44417017
复制相似问题