Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-436

QTextStream operator "<<" ignores everything but numbers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5: Not important P5: Not important
    • 6.0
    • None
    • PySide
    • None
    • win7 python3.5.2 amd64 qt5.6.2

      Subject changed and example created by ctismer
      Writing to a QTextStream with "<<" writes only the numbers. No error message, nothing.

      from PySide2.QtCore import *
      from PySide2.QtGui import *
      from PySide2.QtWidgets import *
      
      def f():
          file = QFile("out.txt")
          if not file.open(QIODevice.WriteOnly | QIODevice.Text):
              return
          out = QTextStream(file)
          out << "The magic number is: " << 49 << "huh" << 123 << "\n"
      
      if __name__ == "__main__":
          f()
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ctismer Christian Tismer
            liuliuab1 ming liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes