資源簡介
c++數據傳入qml, qml數據返回給c++,數據互傳 ,兩種方式
代碼片段和文件信息
#include?
#include?
#include?
#include?“mytest.h“
int?main(int?argc?char?*argv[])
{
????QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
????QGuiApplication?app(argc?argv);
????MyTest?mymsg;
????QQmlApplicationEngine?engine;
????engine.rootContext()->setContextProperty(“mymsg“&mymsg);
????engine.load(QUrl(QStringLiteral(“qrc:/main.qml“)));
????if?(engine.rootobjects().isEmpty())
????????return?-1;
????return?app.exec();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1168??2019-01-10?16:13??ctoqml2\ctoqml2.pro
?????文件??????44174??2019-01-10?16:38??ctoqml2\ctoqml2.pro.user
?????文件?????????66??2019-01-10?16:18??ctoqml2\Jsc
?????文件????????497??2019-01-10?16:17??ctoqml2\main.cpp
?????文件???????1089??2019-01-10?16:37??ctoqml2\main.qml
?????文件????????379??2019-01-10?16:34??ctoqml2\mytesttwo.cpp
?????文件????????455??2019-01-10?16:33??ctoqml2\mytesttwo.h
?????文件????????125??2019-01-10?16:18??ctoqml2\qml.qrc
?????文件???????1162??2019-01-10?15:49??ctoqml\ctoqml.pro
?????文件??????23988??2019-01-10?16:38??ctoqml\ctoqml.pro.user
?????文件????????516??2019-01-10?15:50??ctoqml\main.cpp
?????文件????????995??2019-01-10?16:09??ctoqml\main.qml
?????文件????????354??2019-01-10?16:08??ctoqml\mytest.cpp
?????文件????????421??2019-01-10?16:08??ctoqml\mytest.h
?????文件?????????92??2019-01-10?15:48??ctoqml\qml.qrc
?????目錄??????????0??2019-01-10?16:38??ctoqml2
?????目錄??????????0??2019-01-10?16:38??ctoqml
-----------?---------??----------?-----??----
????????????????75481????????????????????17
- 上一篇:B-樹的源代碼
- 下一篇:快速的將YUV444轉成YUV420格式數據
評論
共有 條評論