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

Cannot pass keyword arguments to QObject subclasses

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 6.5.0
    • PySide
    • None
    • Windows

    Description

      following pattern works for PyQt6, but not for PySide.

       

      from PySide6 import QtWidgets

      class BasePlugin(QtWidgets.QStyledItemDelegate):
          _registry = {}

          def _init_subclass_(cls, identifier=None, **kwargs):
              super()._init_subclass_()
              if identifier is not None:
                  cls._registry[identifier] = cls

      class MyPlugin(BasePlugin, identifier="my_plugin_name"):
          pass

       

      Error message:

      TypeError: sbktype() takes at most 3 arguments (4 given)
      make: *** [E:/dev/prettyqt/Makefile:38: test_pyside6] Error 4

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            phil__65 Philipp Temminghoff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes