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

Python stubs for QItemSelection.__init(self) returning wrong type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.7.2, 6.8.0
    • 6.7
    • Type hints
    • None
    • All
    • 043a8439c (dev), 7887ed7e7 (6.7)

    Description

      The 16429c860888578b5bda7fd75437dd1f6a79b331 correctly fixes the the empty constructor not being seen by Shiboken by declaring it explicitly in Type System Reference:

      <!-- For some reason, the empty selection is not seen. Maybe related to the new [default] tag in Qt6? -->
        <declare-function signature="QItemSelection()" return-type="QItemSelection" />

      But signature generation system now passes the return type of such function as being QItemSelection, which is not correct for constructor calls from the Python POV. The Type System Reference should declare it while modifying the pyi-type type to None.

      Attachments

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

        Activity

          People

            fboni Francisco Boni Neto
            fboni Francisco Boni Neto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes