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

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: dev
    • Fix Version/s: dev
    • Component/s: PySide
    • Labels:
    • Environment:
      OSX
    • Commits:
      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

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              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