Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char *argv[])
- {
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QGuiApplication app(argc, argv);
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
- if (engine.rootObjects().isEmpty())
- return -1;
- QObject *object = engine.rootObjects().first();
- QObject *test= object->findChild<QObject*>("image");
- if(test)
- {
- QThread::msleep(2000);
- QQmlProperty::write(test, "visible", "false");
- QThread::msleep(2000);
- QQmlProperty::write(test, "visible", "true");
- QThread::msleep(2000);
- QQmlProperty::write(test, "visible", "false");
- QThread::msleep(2000);
- QQmlProperty::write(test, "visible", "true");
- }
- return app.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement