Hi,
I’M trying to adjust my existing QML/C++ app for Android and have following problem:
this is my exisitng Qt4 code which works on win32 & linux x86/x86_64:
QObject * btn = this->rootObject()->findChild<QObject*>("login_btn");
if(btn != NULL)QObject::connect(btn, SIGNAL(clicked(const QString &, const QString &)),this->crm, SLOT(Login(const QString &, const QString&)));
else qWarning() << "Can't find login button object on splash screen";
“this” is subclass of QDeclarativeView. I’ve changed it to QQuickView because of Qt5. So, on Android with Qt5 this code doesn’t work and always fails to qWarning…. I have checked rootObject()->children() list and all objects have empty objectName().
Can someone confirm this? Is there new way to find objects in qml in Qt5?
↧