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

Signals not known by mypy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.3.0
    • PySide, Tooling
    • None

      MyPy doesn't know about exposed signals

      from PySide6.QtWidgets import QLineEdit
      from PySide6.QtWidgets import QToolButton
      
      button = QToolButton()
      line_edit = QLineEdit()
      button.clicked.connect(line_edit.clear)
      

      mypy said

      error: "QToolButton" has no attribute "clicked"
      

       And, sure enough, if I look at the QtWidgets.pyi file in my site-packages, it seems to me that no signal is set for any widget

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

            crmaurei Cristian Maureira-Fredes
            zeed Vito De Tullio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes