Ball Aerospace is now part of BAE Systems, Inc. with a new sector name – Space 
& Mission Systems. Learn more here.

from PySide6.QtCore import QObject

class A:
    def __init__(self, val=1):
        print(f"A {val}")

class B(QObject, A):
    def __init__(self):
        QObject.__init__(self)
        A.__init__(self, val=2)

bb=B()

output is
A 1
A 2


How do I correctly call the A init only once with args?


Trevor Clarke
Senior Software Engineer
Space & Mission Systems Sector, BAW Systems, Inc.
T: +1-937-416-7167 | E: trevor.cla...@ballaerospace.com
Fairborn, OH | Pronouns: He/Him
baesystems.com

_______________________________________________
PySide mailing list
PySide@qt-project.org
https://lists.qt-project.org/listinfo/pyside

Reply via email to