diff options
Diffstat (limited to 'src/main_qmladaptor.cpp')
-rw-r--r-- | src/main_qmladaptor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main_qmladaptor.cpp b/src/main_qmladaptor.cpp index 6684d13..c321ec8 100644 --- a/src/main_qmladaptor.cpp +++ b/src/main_qmladaptor.cpp @@ -175,7 +175,7 @@ void MainQMLAdaptor::main_content_replace(QString scene) { bool MainQMLAdaptor::setConnectButtonEnabled(bool enabled) { // Find item via 'objectName' - QQuickItem *scene_remote_control = _engine->rootObjects().at(0)->findChild<QQuickItem*>("Scene_remote_control"); + QQuickItem *scene_remote_control = _engine->rootObjects().takeFirst()->findChild<QQuickItem*>("Scene_remote_control"); QQuickItem *item = scene_remote_control->findChild<QQuickItem*>("start_support_button"); if (item) { item->setProperty("enabled", enabled); |