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

Quick.QQuickImageProvider/__init__: Named arguments aren't picked up

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None
    • Environment:
    • Platform/s:
      Linux/X11

      Description

      When calling the `QtQuick.QQuickImageProvider._init_` method with a named argument, a TypeError is raised:

       

      class GenericImageProviderKwargs(QtQuick.QQuickImageProvider):
      
          def __init__(self):
              super().__init__(type=QtQuick.QQuickImageProvider.ImageType.Image)
      
          def requestImage(self, id_, size, requested_size):
              pass  # not relevant to this report
      
      provider = GenericImageProviderKwargs()
      
      Traceback (most recent call last):
        File "pyside-kwargs.py", line 22, in <module>
          provider = GenericImageProviderKwargs()
        File "pyside-kwargs.py", line 17, in __init__
          super().__init__(type=QtQuick.QQuickImageProvider.ImageType.Image)
      TypeError: PySide6.QtQuick.QQuickImageProvider.__init__(): not enough arguments
      

       
      Doing away with the `type=` keyword works around it.

       

        Attachments

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

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            xtofl Kristoffel Pirard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes