{"id":296090,"date":"2019-12-19T15:00:43","date_gmt":"2019-12-19T15:00:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=296090"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=296090","title":{"rendered":"Qt QJSEngine Hello world"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481142\/\">\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 <i>\u041c.\u0428\u043b\u0435\u0435 \u00abQt \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Qt\u00bb \u00ab\u0427\u0435\u0440\u0435\u043f\u0430\u0448\u044c\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u00bb<\/i>. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u042f\u0437\u044b\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 Qt Scripts\u00bb.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 QML. <\/p>\n<p>  <b>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 Qt Quick<\/b> <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dt\/gp\/5z\/dtgp5zaslbsxythd63as-b5wi2w.png\" alt=\"image\"\/><\/p>\n<p>  <b>\u041e\u043f\u0438\u0448\u0435\u043c \u0444\u043e\u0440\u043c\u0443. \u0424\u0430\u0439\u043b main.qml: <\/b><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"java\">import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.0  Window {     id: window     visible: true     width: Screen.width\/2     height: Screen.height\/2     title: qsTr(&quot;\u0422\u0435\u0441\u0442 jsEnjine&quot;)      property string consoleFontFamily: &quot;Consolas&quot;     property int fontPixelSize: 14      TextArea {         id: textAreaLog         anchors.bottom: rectangle.top         anchors.bottomMargin: 3         anchors.right: parent.right         anchors.rightMargin: 3         anchors.left: parent.left         anchors.leftMargin: 3         anchors.top: parent.top         anchors.topMargin: 3         readOnly: true     }      Rectangle {         id: rectangle         height: 25         anchors.right: parent.right         anchors.rightMargin: 3         anchors.left: parent.left         anchors.leftMargin: 3         anchors.bottom: parent.bottom         anchors.bottomMargin: 3         border.color: &quot;#0c0a0a&quot;          TextEdit {             id: textEditInput             anchors.right: parent.right             anchors.rightMargin: 5             anchors.left: parent.left             anchors.leftMargin: 5             anchors.bottom: parent.bottom             anchors.bottomMargin: 5             anchors.top: parent.top             anchors.topMargin: 5             font.pixelSize: fontPixelSize         }     } }<\/code><\/pre>\n<p>  <b>\u0424\u043e\u0440\u043c\u0430<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/le\/te\/dp\/letedp7s_mkgrckhmjklqmghsv4.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u044b <b>AppCore <\/b> \u0438 <b>Console<\/b>, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043f\u0438\u0448\u0435\u043c <b>main.c<\/b><\/p>\n<pre><code class=\"javascript\">#include &lt;QGuiApplication&gt; #include &lt;QQmlApplicationEngine&gt; #include &lt;QQmlContext&gt; #include &quot;appcore.h&quot;  int main(int argc, char *argv[]) {     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);     QGuiApplication app(argc, argv);     AppCore appCore;     QQmlApplicationEngine engine;     QQmlContext *context = engine.rootContext();\/\/\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442     \/\/\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0430      \/\/\u0442\u0430\u043a \u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0438\u043c\u044f     \/\/\u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435     context-&gt;setContextProperty(&quot;appCore&quot;,&appCore);     engine.load(QUrl(QStringLiteral(&quot;qrc:\/main.qml&quot;)));     if(engine.rootObjects().isEmpty())         return -1;     return app.exec(); } <\/code><\/pre>\n<p>  <b>appcore.h<\/b><\/p>\n<pre><code class=\"java\"> #ifndef APPCORE_H #define APPCORE_H  #include &lt;QObject&gt; #include &lt;QJSEngine&gt; #include &quot;console.h&quot;  class AppCore : public QObject {     Q_OBJECT public:     explicit AppCore(QObject *parent = nullptr); private:     QJSEngine   appScriptEngine;     Console     *userConsole; signals:     Q_INVOKABLE void appEndTextArea(const QString& text);     Q_INVOKABLE void clearTextArea(); public slots:     Q_INVOKABLE void slotEvaluate(const QString& code); }; #endif \/\/ APPCORE_H <\/code><\/pre>\n<p>  <b>appcore.c<\/b><\/p>\n<pre><code class=\"java\"> #include &quot;appcore.h&quot;  AppCore::AppCore(QObject *parent) : QObject(parent) {     userConsole = new Console(this);     QJSValue val = appScriptEngine.newQObject(userConsole);     appScriptEngine.globalObject().setProperty(&quot;console&quot;,val);      connect(userConsole, SIGNAL(appEndTextArea(QString)),this,SIGNAL(appEndTextArea(QString)));     connect(userConsole, SIGNAL(clearTextArea()),this,SIGNAL(clearTextArea())); }  void AppCore::slotEvaluate(const QString& code) {     QJSValue result = appScriptEngine.evaluate(code);     if(result.isError()){         QString er = QString(&quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 %1: %2&quot;).arg(result.property(&quot;lineNumber&quot;).toInt()).arg(result.toString());         emit appEndTextArea(er);     } } <\/code><\/pre>\n<p>  <b>console.h<\/b><\/p>\n<pre><code class=\"java\"> #ifndef CONSOLE_H #define CONSOLE_H  #include &lt;QObject&gt;  class Console : public QObject {     Q_OBJECT public:     explicit Console(QObject *parent = nullptr);      Q_INVOKABLE void log(const QString& message);     Q_INVOKABLE void clear(); signals:     Q_INVOKABLE void appEndTextArea(const QString& text);     Q_INVOKABLE void clearTextArea();  };  #endif \/\/ CONSOLE_H <\/code><\/pre>\n<p>  <b>console.cpp<\/b><\/p>\n<pre><code class=\"java\"> #include &quot;console.h&quot;  Console::Console(QObject *parent) : QObject(parent) {  }  void Console::log(const QString& message) {     emit appEndTextArea(message); }  void Console::clear() {     emit clearTextArea(); } <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <b>AppCore<\/b> \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <b>Console<\/b> \u0432 <i>QJSEngine<\/i>, \u0442\u0430\u043a \u0436\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 <i>\u00abconsole\u00bb<\/i><\/p>\n<pre><code class=\"java\"> QJSValue val = appScriptEngine.newQObject(userConsole); appScriptEngine.globalObject().setProperty(&quot;console&quot;,val); <\/code><\/pre>\n<p>  \u0421\u0438\u0433\u043d\u0430\u043b <i>appEndTextArea(const QString&#038; text)<\/i> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 <u>textAreaLog<\/u> \u0432 <br \/>  <b>main.qml<\/b>.<\/p>\n<p>  \u0421\u0438\u0433\u043d\u0430\u043b <i>clearTextArea()<\/i> \u2014 \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 <u>textAreaLog<\/u> \u0432 <b>main.qml<\/b>.<\/p>\n<p>  \u0421\u043b\u043e\u0442 <i>slotEvaluate(const QString&#038; code)<\/i> \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 js \u043a\u043e\u0434\u0430, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0432 <u>textEditInput<\/u> \u0432 <b>main.qml<\/b>.<\/p>\n<p>  \u0414\u043e\u043f\u0438\u0448\u0435\u043c \u0432 <b>main.qml<\/b> \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432:<\/p>\n<pre><code class=\"java\"> Connections{         target: appCore         onAppEndTextArea:{             textAreaLog.cursorPosition = textAreaLog.length;             textAreaLog.append(text);         }         onClearTextArea:{             textAreaLog.cursorPosition=0;             textAreaLog.text = &quot;&quot;;         }     } <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0434\u043e\u043f\u0438\u0448\u0435\u043c \u0432 <u>textEditInput<\/u> \u0441\u0438\u0433\u043d\u0430\u043b, \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043b\u043e\u0442\u0430 <i>void slotEvaluate(const QString&#038; code)<\/i>:<\/p>\n<pre><code class=\"java\"> TextEdit {             id: textEditInput             anchors.right: parent.right             anchors.rightMargin: 5             anchors.left: parent.left             anchors.leftMargin: 5             anchors.bottom: parent.bottom             anchors.bottomMargin: 5             anchors.top: parent.top             anchors.topMargin: 5             font.pixelSize: fontPixelSize              Keys.onReturnPressed:{                 if(textEditInput.text == &quot;&quot;)return;                 appCore.slotEvaluate(text)                 clear()             }             Keys.onEscapePressed: clear()         } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 <u>textEditInput<\/u> \u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 <i>Enter<\/i> \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430 \u0432 <i>slotEvaluate<\/i> \u0432 <b>AppCore<\/b>. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 ESC \u043f\u043e\u043b\u0435 <u>textEditInput<\/u> \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0432\u0435\u0434\u0435\u043c \u0432 <u>textEditInput<\/u> \u043a\u043e\u043c\u0430\u043d\u0434\u0443 console.log(\u00abHello world\u00bb), \u0442\u043e \u0432 \u043f\u043e\u043b\u0435 <i>textAreaLog<\/i> \u0443\u0432\u0438\u0434\u0438\u043c Hello world. \u0415\u0441\u043b\u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e <i>QJSEngine<\/i>, \u0442\u043e \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0432\u044b\u0441\u0432\u0435\u0442\u0438\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mz\/v7\/sz\/mzv7szd8iemu9j3ntyu94vtr8fu.png\" alt=\"image\"\/><\/p>\n<p>  <b>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,<\/b> \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a QJSEngine \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u041a\u0442\u043e \u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442 <i>\u00ab\u0410 \u043f\u0440\u0438 \u0447\u0435\u043c \u0442\u0443\u0442 JS? \u0412\u0435\u0434\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0421++?\u00bb<\/i>, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f\u2026<\/p>\n<p>  <a href=\"https:\/\/github.com\/zzzkorn\/testJS.git\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 github<\/a><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/481142\/\"> https:\/\/habr.com\/ru\/post\/481142\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481142\/\">\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 <i>\u041c.\u0428\u043b\u0435\u0435 \u00abQt \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Qt\u00bb \u00ab\u0427\u0435\u0440\u0435\u043f\u0430\u0448\u044c\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u00bb<\/i>. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u042f\u0437\u044b\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 Qt Scripts\u00bb.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 QML. <\/p>\n<p>  <b>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 Qt Quick<\/b> <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dt\/gp\/5z\/dtgp5zaslbsxythd63as-b5wi2w.png\" alt=\"image\"\/><\/p>\n<p>  <b>\u041e\u043f\u0438\u0448\u0435\u043c \u0444\u043e\u0440\u043c\u0443. \u0424\u0430\u0439\u043b main.qml: <\/b>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-296090","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=296090"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296090\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}