Home > Mobile >  Not simple Qml program, how to run up?
Not simple Qml program, how to run up?

Time:04-10

 

QCoreApplication app (arg c, argv);
QQmlEngine engine;
MessageBoard msgBoard;

Engine. RootContext () -> setContextProperty (" msgBoard ", & msgBoard);

//QQmlComponent component (& engine, QUrl: : fromLocalFile (" Item. QML "));

Const QUrl url (QStringLiteral (" QRC:/item. QML "));
QQmlComponent component (& engine, url);
Component. The create ();

Return the app. The exec ();



  •  Tags:  
  • Qt
  • Related