[Interest] QML components seems to be 'undefined' at access from QML Timer's onTriggered

Константин Уткин kostaui at mail.ru
Mon Dec 29 04:59:19 CET 2014


Using QML on embedded arm platform, I have encountered another
strange behaviour that I cannot reproduce in Windows.

Environment on platform: Qt 5.2.1, CodeSourcery toolchain 2010.09-50, QPA is EGLFS

Please take a look into .qml
There is a QML Timer that ticks time from time
In main project I have encountered that time from time I cannot access components from 'onTriggered',
because they are become 'undefined'. Some components are simpy gone somewhere, whereas they
are still accessible time from time. So I've created a simple example with same issue. 

Strictly every second access from 'onTriggered' to any component ends with 'undefined' result.
I cannot reproduce it on win32 platform.

timer_test_main.qml :  http://pastebin.com/3sGfsVwT
UpdateObject.js :  http://pastebin.com/6rpx3Rih


#include <QtQml>
#include <QtQml/QQmlApplicationEngine>
#include <QGuiApplication>

int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;

int ret = app.exec();
return ret;


CONFIG += console qml_debug
QT += qml quick widgets
TARGET = timer_test
unix:OBJECTS_DIR = .obj
unix:MOC_DIR = .moc
unix:BIN_DIR = .bin
SOURCES += timer_test_main.cpp
RESOURCES += qml.qrc
unix:QMAKE_CFLAGS += -D__linux__ -D_LINUX_ -DRCF_USE_PROTOBUF -Wno-unused-parameter -Wno-unused-variable -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused-but-set-parameter -std=c++0x
win32:QMAKE_CFLAGS += -DRCF_USE_PROTOBUF -DWIN32_LEAN_AND_MEAN -Wno-unused-parameter -Wno-unused-variable -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused-but-set-parameter -std=c++11
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141229/64a0e98f/attachment.html>

More information about the Interest mailing list