Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Watcher : public QObject{
- Q_OBJECT
- public:
- Watcher(QObject *parent = 0):
- QObject(parent)
- {
- foreach(QObject *child, parent->children()){
- connect(child, SIGNAL(destroyed(QObject*)),
- this, SLOT(_destroyed(QObject*)));
- }
- }
- private slots:
- void _destroyed(QObject *object){
- qDebug() << object << " destroyed";
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement