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

can't use ABC with Pyside2

XMLWordPrintable

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

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes