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

can't use ABC with Pyside2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 5.15.1
    • PySide
    • None
    • All

    Description

      We can''t use ABC ( https://docs.python.org/3/library/abc.html ) with pyside :

      from abc import ABC
      from PySide2.QtCore import QObject
      
      class Abstract(ABC):
          pass
      
      class Concrete(Abstract, QObject):
          pass 
      
      line 7, in <module>
      TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
      

      there somethings about PyQt5 https://stackoverflow.com/questions/46837947/how-to-create-an-abstract-base-class-in-python-which-derived-from-qobject
      but PySide 2 doesn't have pyqtWrapperType

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              jgirardet Jimmy Gir
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes