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

'print' call in 'Dialog' tutorial should have 'flush=True'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.0.3
    • Documentation
    • None
    • Windows 10 x86-64, Python 3.9.2, mintty 3.4.6
    • Windows

    Description

      When running the 'Dialog' tutorial from Git Bash on Windows, pressing the button doesn't work as intended, because Git Bash treats stdout differently. All the text is printed at once when the application is terminated. This can be solved by adding flush=True to the print call:

      print(f"Hello {self.edit.text()}", flush=True)

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            maxbarraclough Max Barraclough
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes