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

Combination of QTextStream and QFile doesn't save the file contents

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.0
    • None
    • PySide
    • OSX
    • d9fb961d6455431abc9ac28df4ac8a39bc68b5bd (pyside2/dev, 15.3.2017)

    Description

      • With https://codereview.qt-project.org/#/c/164371/ applied:
      • Launch examples/mainwindows/application/application.py
      • Write something in the textarea
      • Invoke save action, choose a name, and save the file
      • Try to open with another text editor the file, and see that it is empty.

      Opening an existing file with existing content (using the example), and saving it, will also clear the content of the file.

      I've seen another example which used QFile.save() explicitly, and it worked properly.

      But it seems that a combination of QFile and QTextStream, does not work.

      Attachments

        1. pyside332.py
          0.2 kB
        2. qtcore_module_wrapper.cpp
          0.8 kB
        3. qtextstream_wrapper.cpp
          94 kB

        Issue Links

          For Gerrit Dashboard: PYSIDE-332
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes