[PyQt] QTextstream >>

Christopher Probst christop.probst at gmail.com
Mon Jun 19 16:36:37 BST 2017


Hi,

I am loving the PyQt. I want to confirm that the operator ">>" QTextStream
operator does not work in PyQt5. This will not work:

file = QFile("myfile.txt")

if file.open(QIODevice.ReadOnly):
    stream = QTextStream(file)
    stream >> value
    stream >> text >> value


What are the preferred ways to deserialize an QIODevice in PyQt?

Thanks,
Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170619/0b8ec954/attachment.html>


More information about the PyQt mailing list