I know QT has a parent/child hierarchy way of storing QObject's.

  1. But what happens to root QWidgets? They do not have a constructor that takes a QObject parent. It is possible to make a QObject that does not inherit QWidget the parent of a QWidget?
  2. What happens if you add a QWidget to a QScene? Does the QScene now owns the QWidget or does the QGraphicsViewProxy now owns the QWidget?
  3. What owns the QGraphicsViewProxy objects that is returned by scene->addWidget(new_widget)?
  4. Will a widget take ownership of a layout? E.g. what happens with root_widget->setLayout(new_layout)?
  5. Will the layout take ownership if I add a widget/layout to a root layout, e.g. root_layout->addWidget(new_widget) or root_layout->addLayout(new_sub_layout)?
  6. If I have an application that dynamically creates objects and setup QT signal connections between the events with QObject::connect(), is it safe to assume that the connections will automatically be deleted when either one of the objects they used to connect gets deleted?