def __new__(cls, *args, **kwargs): if not cls.instance: cls.instance = QObject.__new__(cls, *args, **kwargs) else: cls.first = False return cls.instance
def __new__(cls, *args, **kw): # We initialize QObject as early as possible. Without this, Qt complains # if SuperQObject is not the first class in the super class list. inst = QObject.__new__(cls) QObject.__init__(inst) return inst
def __new__(cls): with lock: if cls.instance is None: cls.instance = QObject.__new__(cls) cls.instance.outputList = [] return cls.instance