How Qt
internally holds widgets to process and render them? Does parent widgets have some kind of array with raw pointers to child objects? Or maybe some kind of smart pointers?
Each parent holds a vector of raw pointers to children Github QList<QObject*> children;
.
since you cannot access it, as it is private, Qt makes sure there is no problem with this list because.
If you manually destroy an object with delete
it will remove itself from this list, hence no reference count is needed, it is uniquely owned by its parent, and is dropped on external destruction.
Qt is open-source, you can inspect its source-code to answer any question you have.