Qt Canvas 3D Getting Started

Building Qt Canvas 3D

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 qtcanvas3d.pro, and configure the project with qmake:


After running qmake, build the project with make:

OS Make command
Linux make
Windows (MinGw) mingw32-make
Windows (MSVC) nmake
OSX make

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.

For debug builds:

qmake CONFIG+=debug


qmake CONFIG+=debug_and_release
make debug

For release builds:

qmake CONFIG+=release


qmake CONFIG+=debug_and_release
make release

For both builds (Windows/Mac only):

qmake CONFIG+="debug_and_release build_all"

After building, install the module to your Qt directory:

make install

If you want to uninstall the module:

make uninstall

To build a statically linked version of the QtCanvas3D module, give the following commands:

qmake CONFIG+=static
make install

Running the Examples

Examples for Qt Canvas 3D are found under the examples/canvas3d subdirectory. To build and run a single example, in this case interaction, navigate to the example directory and enter the following commands:


Note: On some platforms, such as Windows, the executable can be generated under debug or release folders, depending on your build.

A Basic Example

For a simple Canvas3D example, see the Lit and Textured Cube Example.

For all examples, check out Qt Canvas 3D Examples.

Creating Qt Canvas 3D Project

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 creatortemplates 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.

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 Locating Wizards.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support