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

Typing: stubs are missing public variables

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.8.2
    • Type hints
    • None
    • Windows

    Description

      Let's take the example of QStyleOption :

      Doc : https://doc.qt.io/qt-6/qstyleoption.html#public-variables

      Current stubs QtWidgets.pyi:6986 :
       

          class QStyleOption(Shiboken.Object):

              class OptionType(enum.Enum):

                   [...]

              class StyleOptionType(enum.Enum):

                   [...]
       
             class StyleOptionVersion(enum.Enum):
                   [...]
       
      The public variables are missing.
       
      In PySide6-stubs, we created a script to add the following :
       
      class QStyleOption(Shiboken.Object):

          direction: PySide6.QtCore.Qt.LayoutDirection
              fontMetrics: PySide6.QtGui.QFontMetrics

          palette: PySide6.QtGui.QPalette
          rect: PySide6.QtCore.QRect
          state: PySide6.QtWidgets.QStyle.StateFlag
          type: int
       

      Attachments

        Issue Links

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

          Activity

            People

              cinucen Ece Cinucen
              bluebird75 Philippe Fremy
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change