Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 5ab010e37991249ab4adaa24d6e39c6e > files > 227

qt5-qtdoc-5.1.1-2.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- scripting.qdoc -->
  <title>Scripting | QtDoc 5.1</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader"></div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#qtscript">QtScript</a></li>
<li class="level1"><a href="#js-api">JS API</a></li>
<li class="level1"><a href="#qml">QML</a></li>
</ul>
</div>
<h1 class="title">Scripting</h1>
<span class="subtitle"></span>
<!-- $$$topics-scripting.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt has three main ways to help make an application scriptable. All of them allow easy integration of the ECMAScript (more widely known as JavaScript) language into the application. Depending on how deep the integration should be, one of these APIs can be used:</p>
<a name="qtscript"></a>
<h2>QtScript</h2>
<p><a href="#qtscript">QtScript</a> is a separate module, designed with scripting applications in mind. It has a mature and rich API that permits a really deep integration of scripting functionality. It allows evaluating and debugging of scripts, and advanced use of objects and functions. It also gives access to a really low level ECMAScript engine API. Full documentation about using <a href="#qtscript">QtScript</a> to make an application scriptable can be found here.</p>
<a name="js-api"></a>
<h2>JS API</h2>
<p>This is a simple API, very similar to <a href="#qtscript">QtScript</a>, but limited to basic functionality. The main classes are QJSEngine and QJSValue, which can be used to embed pure ECMAScript functionality like evaluating scripts and calling functions.</p>
<a name="qml"></a>
<h2>QML</h2>
<p><a href="whatsnew51.html#qt-qml">QML</a> exposes a modified ECMAScript environment. It is designed to mix well with the JavaScript API mentioned earlier. QML may be used without QtQuick components, which may be useful for server side scripting. With QML it is possible to mix pure ECMAScript and declarative components (<a href="qtquick-usecase-integratingjs.html">Use Case - Integrating JavaScript in QML</a>).</p>
<p>All of these three scripting solutions seamlessly inter-operate with the Meta-Object System, which means that all signals and slots and properties of a QObject instance are accessible in an ECMAScript environment.</p>
</div>
<!-- @@@topics-scripting.html -->
</div>
</div>
</div>
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>