Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 0a1223a3e4bb8a61fd0c6bd9fadbd0af > files > 183

qtcanvas3d5-doc-5.12.2-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtcanvas3d.qdoc -->
  <title>Qt Canvas 3D Getting Started | Qt Canvas 3D (deprecated) 5.12.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtcanvas3d-index.html">Qt Canvas 3D (deprecated)</a></td><td >Qt Canvas 3D Getting Started</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtcanvas3d-index.html">Qt 5.12.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#building-qt-canvas-3d">Building Qt Canvas 3D</a></li>
<li class="level1"><a href="#running-the-examples">Running the Examples</a></li>
<li class="level1"><a href="#a-basic-example">A Basic Example</a></li>
<li class="level1"><a href="#creating-qt-canvas-3d-project">Creating Qt Canvas 3D Project</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt Canvas 3D Getting Started</h1>
<span class="subtitle"></span>
<!-- $$$qtcanvas3d-getting-started.html-description -->
<div class="descr"> <a name="details"></a>
<a name="building-qt-canvas-3d"></a>
<h2 id="building-qt-canvas-3d">Building Qt Canvas 3D</h2>
<p><b>Canvas3D module was deprecated in Qt 5.12.</b> Depracated modules are no longer maintained. They are provided to keep old source code working, but they can be removed in a future release. We strongly advise against using deprecated modules in new code or project.</p>
<p>To build the Qt Canvas 3D module from source code, set up a command prompt with an environment for building Qt applications, navigate to the directory containing <code>qtcanvas3d.pro</code>, and configure the project with qmake:</p>
<pre class="cpp plain">

  qmake

</pre>
<p>After running qmake, build the project with make:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >OS</th><th >Make command</th></tr></thead>
<tr valign="top" class="odd"><td >Linux</td><td >make</td></tr>
<tr valign="top" class="even"><td >Windows (MinGw)</td><td >mingw32-make</td></tr>
<tr valign="top" class="odd"><td >Windows (MSVC)</td><td >nmake</td></tr>
<tr valign="top" class="even"><td >OSX</td><td >make</td></tr>
</table></div>
<p>The above generates the default makefiles for your configuration, which is typically the release build if you are using precompiled binary Qt distribution. To build both debug and release, or one specifically, use one of the following qmake lines instead.</p>
<p>For debug builds:</p>
<pre class="cpp plain">

  qmake CONFIG+=debug
  make

</pre>
<p>or</p>
<pre class="cpp plain">

  qmake CONFIG+=debug_and_release
  make debug

</pre>
<p>For release builds:</p>
<pre class="cpp plain">

  qmake CONFIG+=release
  make

</pre>
<p>or</p>
<pre class="cpp plain">

  qmake CONFIG+=debug_and_release
  make release

</pre>
<p>For both builds (Windows/Mac only):</p>
<pre class="cpp plain">

  qmake CONFIG+=&quot;debug_and_release build_all&quot;
  make

</pre>
<p>After building, install the module to your Qt directory:</p>
<pre class="cpp plain">

  make install

</pre>
<p>If you want to uninstall the module:</p>
<pre class="cpp plain">

  make uninstall

</pre>
<p>To build a statically linked version of the QtCanvas3D module, give the following commands:</p>
<pre class="cpp plain">

  qmake CONFIG+=static
  make
  make install

</pre>
<a name="running-the-examples"></a>
<h2 id="running-the-examples">Running the Examples</h2>
<p>Examples for Qt Canvas 3D are found under the <code>examples/canvas3d</code> subdirectory. To build and run a single example, in this case <code>interaction</code>, navigate to the example directory and enter the following commands:</p>
<pre class="cpp plain">

  qmake
  make
  ./interaction

</pre>
<p><b>Note: </b>On some platforms, such as Windows, the executable can be generated under <code>debug</code> or <code>release</code> folders, depending on your build.</p><a name="a-basic-example"></a>
<h2 id="a-basic-example">A Basic Example</h2>
<p>For a simple Canvas3D example, see the <a href="qtcanvas3d-textureandlight-example.html">Lit and Textured Cube Example</a>.</p>
<p>For all examples, check out <a href="qtcanvas3d-examples.html">Qt Canvas 3D Examples</a>.</p>
<a name="creating-qt-canvas-3d-project"></a>
<h2 id="creating-qt-canvas-3d-project">Creating Qt Canvas 3D Project</h2>
<p>For convenience, Qt Canvas 3D comes with a Qt Creator wizard template. The template is provided with the source package and can be found under <i>creatortemplates</i> folder. The Qt Canvas 3D wizard creates a project that includes QML and JavaScript files. It also has, by default, code that draws a cube.</p>
<p>In order to use the wizard template it needs to be copied to the correct location. For more details of the correct location, please see <a href="http://doc.qt.io/qtcreator/creator-project-wizards.html#locating-wizards">Locating Wizards</a>.</p>
</div>
<!-- @@@qtcanvas3d-getting-started.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    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.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>