{"id":171341,"date":"2013-03-02T13:22:03","date_gmt":"2013-03-02T09:22:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=171341"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=171341","title":{"rendered":"<span class=\"post_title\">QML \u0438 C++. \u0413\u043e\u043d\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041e \u0442\u043e\u043c \u043a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 QML \u0432 C++ \u0438 \u043f\u043e\u0441\u043b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u043d\u0438\u043c\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0438\u0445 (\u0434\u0430\u043d\u043d\u044b\u0435) \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0431\u044b\u043b\u043e \u0443\u0436\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/post\/138837\/\">\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e<\/a>. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043b\u0438, \u0432 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u043b\u0435\u0433\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0435\u0439.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0430\u0440\u0443 \u0441\u0430\u043c\u044b\u0445 \u044f\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 QML \u0432 C++ \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0422\u0430\u043a\u0436\u0435 \u043e\u0446\u0435\u043d\u0438\u043c \u0438\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.<a name=\"habracut\"><\/a><\/p>\n<h4>\u041d\u0443, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0430\u0447\u043d\u0435\u043c<\/h4>\n<p>  \u0411\u0435\u0440\u0435\u043c \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0439\u0442\u0438 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443: \u0435\u0441\u0442\u044c \u043e\u043a\u043d\u043e \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u044d\u0442\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 c++ \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u043e\u043a\u043d\u0435.<\/p>\n<p>  <b>\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u043b\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438:<\/b> \u0438\u0437 QML \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043b\u043e\u0442, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 C++ \u043a\u043b\u0430\u0441\u0441\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u043d\u0430\u0448 \u0442\u0435\u043a\u0441\u0442. \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u0442\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 QML.<\/p>\n<p>  \u0424\u0430\u0439\u043b <b>main.cpp<\/b> | \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430\u0448 \u0441\u0438\u0433\u043d\u0430\u043b \u0438 \u0441\u043b\u043e\u0442, \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e (\u043a\u0430\u043a \u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \u0432 qml)  <\/p>\n<pre><code class=\"cpp\">#include &lt;QApplication&gt; #include &quot;qmlapplicationviewer.h&quot; #include &lt;QDeclarativeContext&gt; #include &quot;asd.h&quot;  Q_DECL_EXPORT int main(int argc, char *argv[]) {     QScopedPointer&lt;QApplication&gt; app(createApplication(argc, argv));      QmlApplicationViewer viewer;      asd ASD;     viewer.rootContext()-&gt;setContextProperty(&quot;ASD&quot;, &ASD);      viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);     viewer.setMainQmlFile(QLatin1String(&quot;qml\/habr1\/main.qml&quot;));      viewer.showExpanded();      return app-&gt;exec(); } <\/code><\/pre>\n<p>  \u0424\u0430\u0439\u043b <b>asd.h<\/b> (\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0438 \u0441\u043b\u043e\u0442\u043e\u043c)  <\/p>\n<pre><code class=\"cpp\">#ifndef ASD_H #define ASD_H  #include &lt;QObject&gt;  class asd : public QObject {     Q_OBJECT  public:     explicit asd(QObject *parent = 0);      signals:     void transmitNewText(QString text);      public slots:     void getOldText(QString text); };  #endif \/\/ ASD_H <\/code><\/pre>\n<p>  \u0424\u0430\u0439\u043b <b>asd.cpp<\/b> (\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u043b\u043e\u0442) | \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430, \u0441\u043b\u043e\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u043d\u0435\u043c\u0443 \u0441\u043b\u043e\u0432\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b  <\/p>\n<pre><code class=\"cpp\">#include &quot;asd.h&quot;  asd::asd(QObject *parent) :     QObject(parent) { }  void asd::getOldText(QString text){     emit transmitNewText(text + &quot; Hello!&quot;); } <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 <b>main.qml<\/b> (\u043d\u0430\u0448\u0435 \u043e\u043a\u043d\u043e \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c) | \u041f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438 \u043c\u044b\u0448\u0438 (onClicked) \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043b\u043e\u0442 \u0438 \u0436\u0434\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b (onTransmitNewText) \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u043e\u043a\u043d\u0435  <\/p>\n<pre><code class=\"javascript\">import QtQuick 1.1  Rectangle {     width: 360     height: 360      Connections {         target: ASD         onTransmitNewText: text1.text = text     }      Text {         id: text1         text: qsTr(&quot;Hello World.&quot;)         anchors.centerIn: parent     }      MouseArea {         anchors.fill: parent         onClicked: ASD.getOldText(text1.text)     } } <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u043a\u0443\u0447\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 \u0441\u043b\u043e\u0442\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0441 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/0ad\/d00\/e5a\/0add00e5ac152f4808dbfe515fa026d2.png\"\/><\/p>\n<p>  \u0414\u043b\u044f \u0447\u0438\u0441\u0442\u043e\u0442\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043a\u043b\u0438\u043a\u043d\u0435\u043c \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0435 20 \u0440\u0430\u0437:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/073\/8a0\/ad0\/0738a0ad0929bdb99048a97d4bbfa35d.png\"\/><\/p>\n<p>  \u0412\u0438\u0434\u0438\u043c \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u00ab\u0421\u0438\u0433\u043d\u0430\u043b\u044b\u00bb. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0448\u043a\u0430\u043b\u0443, \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0445\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0442.\u043a. \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0430 \u0434\u043b\u0438\u0442\u0441\u044f \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043b\u043e\u0442\u0430 \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/070\/52c\/caf\/07052ccaf6b5ba6d644e5842ee29f76c.png\"\/><\/p>\n<p>  <b>\u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/b> \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u044d\u0442\u043e\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u043e \u0441\u043b\u043e\u0442\u0430\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043d\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u0442\u0435\u043c \u0436\u0435 \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0438\u0433\u043d\u0430\u043b \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0442\u043e\u043c, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 QML.<\/p>\n<p>  \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435.<\/p>\n<p>  \u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0448 <b>main.cpp<\/b> (\u0442\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0441\u043b\u043e\u0442\u044b \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b)  <\/p>\n<pre><code class=\"cpp\">#include &lt;QApplication&gt; #include &quot;qmlapplicationviewer.h&quot; #include &lt;QGraphicsObject&gt; #include &quot;asd.h&quot;  Q_DECL_EXPORT int main(int argc, char *argv[]) {     QScopedPointer&lt;QApplication&gt; app(createApplication(argc, argv));      QmlApplicationViewer viewer;     viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);     viewer.setMainQmlFile(QLatin1String(&quot;qml\/habr2\/main.qml&quot;));      asd ASD;     QObject *qml = viewer.rootObject();      QObject::connect(qml, SIGNAL(transmitOldText(QString)),                      &ASD, SLOT(getOldText(QString)));      QObject::connect(&ASD, SIGNAL(transmitNewText(QVariant)),                      qml, SLOT(getNewText(QVariant)));      viewer.showExpanded();      return app-&gt;exec(); } <\/code><\/pre>\n<p>  <b>asd.h<\/b> (\u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430) | \u0442.\u043a. \u0432 qml \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <i>QString<\/i> \u043d\u0430 <i>QVariant<\/i>  <\/p>\n<pre><code class=\"cpp\">#ifndef ASD_H #define ASD_H  #include &lt;QObject&gt; #include &lt;QVariant&gt;  class asd : public QObject {     Q_OBJECT  public:     explicit asd(QObject *parent = 0);  signals:     void transmitNewText(QVariant text);  public slots:     void getOldText(QString text); };  #endif \/\/ ASD_H <\/code><\/pre>\n<p>  <b>asd.cpp<\/b> (\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 <i>QVariant<\/i>)  <\/p>\n<pre><code class=\"cpp\">#include &quot;asd.h&quot;  asd::asd(QObject *parent) :     QObject(parent) { }  void asd::getOldText(QString text){     emit transmitNewText(QVariant(text + &quot; Hello!&quot;)); } <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u043d\u0430\u0448\u0435 \u043d\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e <b>main.qml<\/b>  <\/p>\n<pre><code class=\"javascript\">import QtQuick 1.1  Rectangle {     id: rth     width: 360     height: 360      function getNewText(text){         text1.text = text     }      signal transmitOldText(string text)      Text {         id: text1         text: qsTr(&quot;Hello World.&quot;)         anchors.centerIn: parent     }      MouseArea {         anchors.fill: parent         onClicked: transmitOldText(text1.text)     } } <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2aa\/2db\/3e2\/2aa2db3e2e7d09ec36121dc38a3e5938.png\"\/><\/p>\n<p>  <b>\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u0438\u0442\u043e\u0433:<\/b> \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e <b>0.9 \u043c\u0441<\/b> \u0414\u0430, \u0448\u0442\u0443\u043a\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u0448\u0438\u0431\u043a\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u0430\u044f, \u043d\u043e \u043d\u0438\u043a\u0442\u043e \u0432\u0435\u0434\u044c \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u043b \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u044d\u0434\u0430\u043a \u0432 20. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043f\u0440\u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0438 \u0441\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0432\u0435\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  <b>\u0417\u0430\u0447\u0435\u043c \u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e<\/b> \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c? \u041c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u043c\u044b\u0441\u043b\u044c, \u0438\u0431\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u00ab\u0435\u0440\u0443\u043d\u0434\u043e\u0439\u00bb \u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f. \u041d\u0443 \u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0441 \u0432\u0430\u043c\u0438. \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/171341\/\"> http:\/\/habrahabr.ru\/post\/171341\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041e \u0442\u043e\u043c \u043a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 QML \u0432 C++ \u0438 \u043f\u043e\u0441\u043b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u043d\u0438\u043c\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0438\u0445 (\u0434\u0430\u043d\u043d\u044b\u0435) \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0431\u044b\u043b\u043e \u0443\u0436\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/post\/138837\/\">\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e<\/a>. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043b\u0438, \u0432 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u043b\u0435\u0433\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0435\u0439.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0430\u0440\u0443 \u0441\u0430\u043c\u044b\u0445 \u044f\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 QML \u0432 C++ \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0422\u0430\u043a\u0436\u0435 \u043e\u0446\u0435\u043d\u0438\u043c \u0438\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.<\/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-171341","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/171341","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=171341"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/171341\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=171341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=171341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=171341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}