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

QTextStream operator "<<" ignores everything but numbers

    XMLWordPrintable

Details

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

    Description

      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()
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes