@raven-worx
Hello,
Thanks for the code, but I know how to do the scheduling. I actually went with QPointer<QObject> since the QObject might be deleted while waiting in the event loop. Like this:
bool AgDial::eventFilter(QObject * object, QEvent * event)
{
switch (event->type())
{
case QEvent::ChildAdded:
QMetaObject::invokeMethod(this, "scheduleChildAdd", Qt::QueuedConnection, Q_ARG(QPointer<QObject>, QPointer<QObject>(reinterpret_cast<QChildEvent *>(event)->child())));
break;
case QEvent::ChildRemoved:
d()->detachAction(reinterpret_cast<QChildEvent *>(event)->child());
break;
}
return QStackedWidget::eventFilter(object, event);
}
Thanks for taking the time though!
Kind regards.