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

Wrong type hint for QFontDialog.getFont.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15.1
    • Fix Version/s: 6.1
    • Component/s: PySide
    • Labels:
      None
    • Environment:
      linux deepin
    • Platform/s:
      Linux/X11
    • Commits:
      3506158551488788450498f9b4ffe86375172fea (pyside/pyside-setup/dev) 7846820197b95ffc74e899df600542f5f2eaf3c7 (pyside/pyside-setup/6.0) b833d09c0a83d54899bbdf36367c15fb820d63c6 (pyside/tqtc-pyside-setup/5.15)

      Description

      The type hint says:
      typing.Tuple[PySide2.QtGui.QFont, bool]

      But in reality, the output is reversed:

      font, ok = QFontDialog.getFont()
       print(font, ok)
      

      True  <PySide2.QtGui.QFont(Segoe UI,10,-1,5,25,0,0,0,0,0,Light) at 0x7f0fc37595c8>

        Attachments

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

          Activity

            People

            Assignee:
            ctismer Christian Tismer
            Reporter:
            blacangeldsf dongsheng fu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes