{"id":665,"date":"2021-12-21T15:43:50","date_gmt":"2021-12-21T07:43:50","guid":{"rendered":"https:\/\/www.houjianwei.space\/?p=665"},"modified":"2021-12-21T15:43:50","modified_gmt":"2021-12-21T07:43:50","slug":"qt%e7%b3%bb%e5%88%97%e6%96%87%e7%ab%a0%ef%bc%881%ef%bc%89%ef%bc%9aqt%e4%b8%8eqml%e7%9a%84%e7%ae%80%e5%8d%95%e4%ba%a4%e4%ba%92","status":"publish","type":"post","link":"https:\/\/jianwei.fun\/?p=665","title":{"rendered":"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92"},"content":{"rendered":"\n<p>\u8bf4\u76f4\u767d\u4e00\u70b9\uff0cQML\u4e3b\u8981\u7528\u6765\u5f00\u53d1\u754c\u9762\uff0cQT C++\u4e3b\u8981\u7528\u6765\u5f00\u53d1\u8f6f\u4ef6\u529f\u80fd\u903b\u8f91\uff0c\u6211\u4eec\u5e0c\u671b\uff0c\u754c\u9762\u662f\u754c\u9762\uff0c\u903b\u8f91\u662f\u903b\u8f91\uff0c\u5206\u7684\u5f00\u4e00\u4e9b\u4e0d\u4f1a\u663e\u5f97\u5341\u5206\u6df7\u4e71\uff0c\u6240\u4ee5\u5c31\u514d\u4e0d\u4e86QML\u548cC++\u4e4b\u95f4\u7684\u76f8\u4e92\u4ea4\u4e92\uff0c\u4e3b\u8981\u5305\u62ecQML\u8c03\u7528C++\u7c7b\u7684\u65b9\u6cd5\uff0c\u4fe1\u53f7\u4f20\u9012\u7b49\u3002<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-color has-text-color has-medium-font-size\"><strong>\u4e00\u3001\u8ba9QML\u80fd\u8c03\u7528C++\u7c7b\u7684\u65b9\u6cd5<\/strong><\/p>\n\n\n\n<p>\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5b9e\u73b0\uff0c\u8fd9\u91cc\u5148\u8bb2\u4e00\u79cd<\/p>\n\n\n\n<p>\u9996\u5148\u8bb2\u4e00\u4e0bQ_PROPERTY() \u7684\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Q_PROPERTY(double value1 READ value1 WRITE setValue1 NOTIFY value1Changed)<\/code><\/pre>\n\n\n\n<p>\u89e3\u91ca\uff1a<\/p>\n\n\n\n<p>\u6709\u4e00\u4e2adouble\u7c7b\u578b\u7684\u53d8\u91cfvalue1\uff0c<\/p>\n\n\n\n<p>\u8bfb\u53d6\u8fd9\u4e2a\u53d8\u91cf\u7684\u503c\u7684\u65b9\u6cd5\u662fvalue1();<\/p>\n\n\n\n<p>\u4fee\u6539\u8fd9\u4e2a\u53d8\u91cf\u503c\u7684\u65b9\u6cd5\u662f setValue1(double value1);<\/p>\n\n\n\n<p>\u4e00\u65e6value1\u7684\u503c\u53d1\u751f\u53d8\u5316\uff0c\u4f1a\u53d1\u51favalue1Changed(); \u4fe1\u53f7\uff08\u4e0d\u4f1a\u81ea\u52a8\u53d1\u51fa\u54e6\uff0c\u9700\u8981\u81ea\u5df1\u624b\u52a8emit\u53d1\u5c04\u4fe1\u53f7\uff0c\u8fd9\u91cc\u53ea\u662f\u58f0\u660e\u7ed9QML\uff08\u544a\u8bc9QML\u8fd9\u56de\u4e8b\uff0c\u4e0d\u662f\u4f1a\u81ea\u52a8\u5b8c\u6210\uff0c\u5b9e\u73b0\u65b9\u6cd5\u540e\u9762\u4f1a\u8bf4\uff09\uff0c\u5305\u62ec\u8bfb\u53d6\u548c\u4fee\u6539\u53d8\u91cf\u503c\u7684\u65b9\u6cd5\uff0c\u90fd\u662f\u8981\u81ea\u5df1\u5b9e\u73b0\u7684\uff0cQ_PROPERTY\u4e3b\u8981\u5c31\u662f\u7528\u6765\u505a\u8fd9\u4e9b\u7b80\u5355\u7684\u53d8\u91cf\u53ef\u4ee5\u8ba9QML\u76f4\u63a5\u8bfb\u5199\u64cd\u4f5c\uff0c\u8bfb\u5199\u51fd\u6570\u6539\u53d8\u4fe1\u53f7\u90fd\u6253\u5305\u597d\u7ed9QML.<\/p>\n\n\n\n<p>\u6211\u8fd9\u91cc\u653e\u4e00\u4e2aDemoClass\u5b9e\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#ifndef DEMOCLASS_H\n#define DEMOCLASS_H\n\n#include &lt;QObject>\n\nclass DemoClass<strong> : public QObject<\/strong>\n{\n    <strong>Q_OBJECT<\/strong>\n    Q_PROPERTY(double value1 READ value1 WRITE setValue1 NOTIFY value1Changed)\n    Q_PROPERTY(int value2 READ value2 WRITE setValue2 NOTIFY value2Changed)\n    Q_PROPERTY(bool value3 READ value3 WRITE setValue3 NOTIFY value3Changed)\n\npublic:\n    explicit DemoClass(QObject *parent = nullptr);\n    ~DemoClass();\n\n    double value1() const;\n    int value2() const;\n    bool value3() const;\n\n    void setValue1(double value1);\n    void setValue2(int value2);\n    void setValue3(bool value3);\n\n    Q_INVOKABLE void qmlInterfaceExample();\n\nsignals:\n    void value1Changed();\n    void value2Changed();\n    void value3Changed();\n\n    void exampleSignalToBackGround();\n\n\n\nprivate:\n    double mf64_value1;\n    int mi_value2;\n    bool mb_value3;\n};\n\n#endif \/\/ DEMOCLASS_H\n<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6bb5\u793a\u4f8b\u4ee3\u7801\u4e2d\u5c31\u5305\u62ec\u4e86\u4e09\u4e2a\u4e0d\u540c\u7c7b\u578b\u7684\u53d8\u91cf\u7684\u8bfb\u53d6\u3001\u4fee\u6539\u3001\u4fe1\u53f7\u53d1\u5c04\uff0c\u5e76\u4e14Q_PROPERTY()\u58f0\u660e\u3002\u65b0\u5efa\u7c7b\u4e0d\u8981\u5fd8\u4e86\u7ee7\u627fQObject\u7c7b\uff0c\u5e76\u4e14\u52a0\u4e0aQ_OBJECT\u5b8f\uff08\u4ee3\u7801\u52a0\u7c97\u90e8\u5206\uff09\uff0c\u5176\u4e2d\u6d89\u53ca\u7684Q_INVOKABLE\u662f\u628a \u65b9\u6cd5\u66b4\u9732\u7ed9QML\uff0c\u53ef\u4ee5\u5728QML\u91cc\u9762\u76f4\u63a5\u8c03\u7528\u3002Q_PROPERTY\u4e3b\u8981\u662f\u6253\u5305\u4e00\u4e9b\u53d8\u91cf\u4fee\u6539\u8bfb\u53d6\u7b49\u64cd\u4f5c\uff0cQ_INVOKABLE\u5c31\u662f\u628a\u60f3\u66b4\u9732\u7ed9QML\u7684\u7c7b\u7684\u65b9\u6cd5\u76f4\u63a5\u66b4\u9732\u51fa\u53bb\uff0cQML\u76f4\u63a5\u53ef\u4ee5\u8c03\u7528\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u662fDemoClass\u7c7b\u7684\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u8bfb\u5199\u51fd\u6570\u548c\u4fe1\u53f7\u53d1\u5c04\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"DemoClass.h\"\n\n#include &lt;QDebug>\n\nDemoClass::DemoClass(QObject *parent) : QObject(parent)\n{\n    mf64_value1 = 0;\n    mi_value2 = 0;\n    mb_value3 = 0;\n}\n\nDemoClass::~DemoClass()\n{\n\n}\n\ndouble DemoClass::value1() const\n{\n    return mf64_value1;\n}\n\nvoid DemoClass::setValue1(double value1)\n{\n    if (mf64_value1 != value1)\n    {\n        mf64_value1 = value1;\n        emit value1Changed();\n    }\n}\n\nint DemoClass::value2() const\n{\n    return mi_value2;\n}\n\nvoid DemoClass::setValue2(int value2)\n{\n    if (mi_value2 != value2)\n    {\n        mi_value2 = value2;\n        emit value2Changed();\n    }\n}\n\nbool DemoClass::value3() const\n{\n    return mb_value3;\n}\n\nvoid DemoClass::setValue3(bool value3)\n{\n    if (mb_value3 != value3)\n    {\n        mb_value3 = value3;\n        emit value3Changed();\n    }\n}\n\nvoid DemoClass::qmlInterfaceExample()\n{\n    qDebug() &lt;&lt; \"DemoClass::qmlInterfaceExample\";\n    emit exampleSignalToBackGround();\n}\n<\/code><\/pre>\n\n\n\n<p>DemoClass\u7c7b\u5df2\u7ecf\u5b8c\u6210\u4e4b\u540e\uff0c\u5982\u4f55\u624d\u80fd\u4eceQML\u91cc\u9762\u76f4\u63a5\u8c03\u7528\u5462\uff1f\u770b\u4e0b\u53bb<\/p>\n\n\n\n<p>\u6211\u4eec\u5230\u9879\u76ee\u4e0bmain.cpp\u4e2d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;QApplication>\n#include &lt;QQmlApplicationEngine>\n<strong>#include &lt;QQmlContext><\/strong>\n#include &lt;QTranslator>\n#include &lt;QtDebug>\n<strong>#include \"demo\/DemoClass.h\"<\/strong>\n\nint main(int argc, char *argv&#91;])\n{\n    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);\n\n    QApplication app(argc, argv);\n    QQmlApplicationEngine engine;\n\n    <strong>QQmlContext* rootContext = engine.rootContext();<\/strong>\n    <strong>DemoClass* demoClass = new DemoClass(&amp;app);<\/strong>\n   <strong> rootContext->setContextProperty(\"demoClass\", demoClass);<\/strong>\n\n    const QUrl url(QStringLiteral(\"qrc:\/qml\/main.qml\"));\n    QObject::connect(&amp;engine, &amp;QQmlApplicationEngine::objectCreated,\n                     &amp;app, &#91;url](QObject *obj, const QUrl &amp;objUrl) {\n        if (!obj &amp;&amp; url == objUrl)\n            QCoreApplication::exit(-1);\n    }, Qt::QueuedConnection);\n    engine.load(url);\n    return app.exec();\n}\n<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\u770b\u52a0\u7c97\u90e8\u5206\u5c31\u53ef\u4ee5\uff0c\u5f15\u7528QQmlContext\uff0c\u5f15\u7528\u6211\u4eec\u81ea\u5df1\u65b0\u5efa\u7684DemoClass\u7c7b\uff0c\u65b0\u5efa\u4e00\u4e2aQQmlContext\u5b9e\u4f8b\uff08 <strong>QQmlContext* rootContext = engine.rootContext();<\/strong> \uff09\uff0c\u65b0\u5efa\u4e00\u4e2aDemoClass\u5b9e\u4f8b\uff08 <strong>DemoClass* demoClass = new DemoClass(&amp;app);<\/strong> \uff09\uff0c\u8bbe\u7f6e\u4e0a\u4e0b\u6587\u5c5e\u6027\uff08 <strong>rootContext->setContextProperty(&#8220;demoClass&#8221;, demoClass);<\/strong> \uff09\uff0c\u81f3\u6b64\u8bbe\u7f6e\u5b8c\u6bd5\u3002\u6211\u4eec\u5230QML\u6587\u4ef6\u4e2d\u8fdb\u884c\u5f15\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> demoClass.value1 = 0;\n console.log(\"demoClass.value1: \", demoClass.value1)\n demoClass.value1 = 2;\n console.log(\"demoClass.value1: \", demoClass.value1)\n demoClass.qmlInterfaceExample();<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\u8bbe\u7f6e\u4e86\u4e0a\u4e0b\u6587\u5c5e\u6027\u4e4b\u540e\uff0c\u6211\u4eec\u76f4\u63a5\u4f7f\u7528  demoClass.value1 = 0; \u5c31\u53ef\u4ee5\u5bf9C++\u7c7b\u91cc\u9762\u7684value1\u8fdb\u884c\u5199\u64cd\u4f5c\uff0c demoClass.value1 \u8fdb\u884c\u8bfb\u64cd\u4f5c\uff0c<em>demoClass<\/em>.qmlInterfaceExample();\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528Q_INVOKABLE\u4fee\u9970\u7684\u65b9\u6cd5\uff0c\u5341\u5206\u65b9\u4fbf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\n\u8bf4\u76f4\u767d\u4e00\u70b9\uff0cQML\u4e3b\u8981\u7528\u6765\u5f00\u53d1\u754c\u9762\uff0cQT&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/jianwei.fun\/?p=665\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vk_price":0},"categories":[4],"tags":[23,24],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92 - \u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jianwei.fun\/?p=665\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92 - \u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9\" \/>\n<meta property=\"og:description\" content=\"\u8bf4\u76f4\u767d\u4e00\u70b9\uff0cQML\u4e3b\u8981\u7528\u6765\u5f00\u53d1\u754c\u9762\uff0cQT&hellip; Continue reading &ldquo;QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92&rdquo;&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jianwei.fun\/?p=665\" \/>\n<meta property=\"og:site_name\" content=\"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hou\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-21T07:43:50+00:00\" \/>\n<meta name=\"author\" content=\"Houjianwei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hou\" \/>\n<meta name=\"twitter:site\" content=\"@hou\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Houjianwei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jianwei.fun\/?p=665#article\",\"isPartOf\":{\"@id\":\"https:\/\/jianwei.fun\/?p=665\"},\"author\":{\"name\":\"Houjianwei\",\"@id\":\"https:\/\/jianwei.fun\/#\/schema\/person\/88cea021deda9873b6e75b0687fd5956\"},\"headline\":\"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92\",\"datePublished\":\"2021-12-21T07:43:50+00:00\",\"dateModified\":\"2021-12-21T07:43:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jianwei.fun\/?p=665\"},\"wordCount\":80,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/jianwei.fun\/#organization\"},\"keywords\":[\"QML\",\"QT\"],\"articleSection\":[\"QT\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/jianwei.fun\/?p=665#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jianwei.fun\/?p=665\",\"url\":\"https:\/\/jianwei.fun\/?p=665\",\"name\":\"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92 - \u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9\",\"isPartOf\":{\"@id\":\"https:\/\/jianwei.fun\/#website\"},\"datePublished\":\"2021-12-21T07:43:50+00:00\",\"dateModified\":\"2021-12-21T07:43:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jianwei.fun\/?p=665#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jianwei.fun\/?p=665\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jianwei.fun\/?p=665#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/jianwei.fun\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jianwei.fun\/#website\",\"url\":\"https:\/\/jianwei.fun\/\",\"name\":\"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9\",\"description\":\"\u83dc\u9e1f\u6210\u957f\u4e4b\u8def\",\"publisher\":{\"@id\":\"https:\/\/jianwei.fun\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jianwei.fun\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jianwei.fun\/#organization\",\"name\":\"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9\",\"url\":\"https:\/\/jianwei.fun\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/jianwei.fun\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jianwei.fun\/wp-content\/uploads\/2021\/10\/cropped-cropped-monkey-1.png\",\"contentUrl\":\"https:\/\/jianwei.fun\/wp-content\/uploads\/2021\/10\/cropped-cropped-monkey-1.png\",\"width\":203,\"height\":203,\"caption\":\"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9\"},\"image\":{\"@id\":\"https:\/\/jianwei.fun\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/hou\",\"https:\/\/twitter.com\/hou\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/jianwei.fun\/#\/schema\/person\/88cea021deda9873b6e75b0687fd5956\",\"name\":\"Houjianwei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/jianwei.fun\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/88e7907f36adcd968cc7ce6e019c641a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/88e7907f36adcd968cc7ce6e019c641a?s=96&d=mm&r=g\",\"caption\":\"Houjianwei\"},\"sameAs\":[\"https:\/\/jianwei.fun\"],\"url\":\"https:\/\/jianwei.fun\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92 - \u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jianwei.fun\/?p=665","og_locale":"zh_CN","og_type":"article","og_title":"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92 - \u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9","og_description":"\u8bf4\u76f4\u767d\u4e00\u70b9\uff0cQML\u4e3b\u8981\u7528\u6765\u5f00\u53d1\u754c\u9762\uff0cQT&hellip; Continue reading &ldquo;QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92&rdquo;&hellip;","og_url":"https:\/\/jianwei.fun\/?p=665","og_site_name":"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9","article_publisher":"https:\/\/www.facebook.com\/hou","article_published_time":"2021-12-21T07:43:50+00:00","author":"Houjianwei","twitter_card":"summary_large_image","twitter_creator":"@hou","twitter_site":"@hou","twitter_misc":{"\u4f5c\u8005":"Houjianwei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jianwei.fun\/?p=665#article","isPartOf":{"@id":"https:\/\/jianwei.fun\/?p=665"},"author":{"name":"Houjianwei","@id":"https:\/\/jianwei.fun\/#\/schema\/person\/88cea021deda9873b6e75b0687fd5956"},"headline":"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92","datePublished":"2021-12-21T07:43:50+00:00","dateModified":"2021-12-21T07:43:50+00:00","mainEntityOfPage":{"@id":"https:\/\/jianwei.fun\/?p=665"},"wordCount":80,"commentCount":0,"publisher":{"@id":"https:\/\/jianwei.fun\/#organization"},"keywords":["QML","QT"],"articleSection":["QT"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jianwei.fun\/?p=665#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jianwei.fun\/?p=665","url":"https:\/\/jianwei.fun\/?p=665","name":"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92 - \u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9","isPartOf":{"@id":"https:\/\/jianwei.fun\/#website"},"datePublished":"2021-12-21T07:43:50+00:00","dateModified":"2021-12-21T07:43:50+00:00","breadcrumb":{"@id":"https:\/\/jianwei.fun\/?p=665#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jianwei.fun\/?p=665"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jianwei.fun\/?p=665#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/jianwei.fun\/"},{"@type":"ListItem","position":2,"name":"QT\u7cfb\u5217\u6587\u7ae0\uff081\uff09\uff1aQT\u4e0eQML\u7684\u7b80\u5355\u4ea4\u4e92"}]},{"@type":"WebSite","@id":"https:\/\/jianwei.fun\/#website","url":"https:\/\/jianwei.fun\/","name":"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9","description":"\u83dc\u9e1f\u6210\u957f\u4e4b\u8def","publisher":{"@id":"https:\/\/jianwei.fun\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jianwei.fun\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"Organization","@id":"https:\/\/jianwei.fun\/#organization","name":"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9","url":"https:\/\/jianwei.fun\/","logo":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/jianwei.fun\/#\/schema\/logo\/image\/","url":"https:\/\/jianwei.fun\/wp-content\/uploads\/2021\/10\/cropped-cropped-monkey-1.png","contentUrl":"https:\/\/jianwei.fun\/wp-content\/uploads\/2021\/10\/cropped-cropped-monkey-1.png","width":203,"height":203,"caption":"\u4faf\u5148\u751f\u7684\u6280\u672f\u5c0f\u7ad9"},"image":{"@id":"https:\/\/jianwei.fun\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hou","https:\/\/twitter.com\/hou"]},{"@type":"Person","@id":"https:\/\/jianwei.fun\/#\/schema\/person\/88cea021deda9873b6e75b0687fd5956","name":"Houjianwei","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/jianwei.fun\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/88e7907f36adcd968cc7ce6e019c641a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/88e7907f36adcd968cc7ce6e019c641a?s=96&d=mm&r=g","caption":"Houjianwei"},"sameAs":["https:\/\/jianwei.fun"],"url":"https:\/\/jianwei.fun\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/jianwei.fun\/index.php?rest_route=\/wp\/v2\/posts\/665"}],"collection":[{"href":"https:\/\/jianwei.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianwei.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianwei.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jianwei.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=665"}],"version-history":[{"count":0,"href":"https:\/\/jianwei.fun\/index.php?rest_route=\/wp\/v2\/posts\/665\/revisions"}],"wp:attachment":[{"href":"https:\/\/jianwei.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianwei.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianwei.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}