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

Typing: stubs are missing public variables

XMLWordPrintable

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

      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
       

        1. qstyleoption.py
          0.4 kB
          Philippe Fremy
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There is 1 open Gerrit change