Qt 6.11 is out! See what's new in the release
blog
How Could I stop all timers in Qml?
-
@W-Y-Kim There are many ways for eg. finding children, setting context property or using signals etc..
UsingfindChildrenit can be done as:QQuickView view; view.setSource(QUrl(QStringLiteral("qrc:/main.qml"))); auto objList = view.rootObject()->findChildren<QObject *>(QString(), Qt::FindChildrenRecursively); for (const auto& obj: objList) { if (obj->inherits("QQmlTimer")) { obj->setProperty("running", false); } }