#include <QtCore/qobjectcleanuphandler.h> #ifndef QOBJECTCLEANUPHANDLER_H class QObjectCleanupHandler: public QObject{ /* Some contents are skipped to improve readability */ private: QObjectList cleanupObjects; /* ... */ }; #endif // QOBJECTCLEANUPHANDLER_H