[PySide] problem with __init__ and QObject
Clarke, Trevor
Trevor.Clarke at ballaerospace.com
Mon Mar 18 20:31:19 CET 2024
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.clarke at ballaerospace.com
Fairborn, OH | Pronouns: He/Him
baesystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20240318/6b06507c/attachment.htm>
More information about the PySide
mailing list