snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
6 stars 2 forks source link

[CODE] Add `parent` argument to subclasses of `QObject` #30

Closed kangz12345 closed 1 year ago

kangz12345 commented 1 year ago

The parent is a concept in Qt system, and all the QObject (not only the QWidget) instances have that property. This constructs an object tree, but I don't know how important it is. As far as I know, the children objects are deleted when the parent is destructed. I guess it would be good to keep the right object tree so that the Qt system will work properly.

Let's add parent=None argument to __init__() of classes which inherit QObject, and call super().__init__(parent=parent) to keep the right object tree.

_Originally posted by @kangz12345 in https://github.com/snu-quiqcl/swift/pull/27#discussion_r1123277576_

BECATRUE commented 1 year ago

Even if you assigned yourself, if you are busy to develop this, may I implement it after making Pollor app?

kangz12345 commented 1 year ago

Even if you assigned yourself, if you are busy to develop this, may I implement it after making Pollor app?

Oh, sure you may! You can change the assignee when you want to do this. :)