Qt Canvas Painter | Qt 6.11.1
Description: Provides hardware-accelerated painting API on QRhi.

- Qt 6.11
- Qt Canvas Painter
- Qt Canvas Painter | Commercial or GPLv3

# Qt Canvas Painter

The Qt Canvas Painter module provides classes for hardware-accelerated imperative 2D painting. This painting API is available for both Qt Quick and Qt Widgets, and can also be used directly with QRhi. The API design generally follows HTML canvas 2d context, with some reductions and some additions.

Compared to QPainter, the Qt Canvas Painter is more compact and has fewer abstractions, aiming to perform optimally on QRhi. Qt Canvas Painter is designed for GPU rendering and does not have a CPU backend as QPainter does.

Note: Qt Canvas Painter in 6.11 is in Technology Preview, excluding its API from Qt's compatibility promises.

## Using the Module

### C++ API

Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake.

#### Building with CMake

Use the `find_package()` command to locate the needed module component in the `Qt6` package:

     find_package(Qt6 REQUIRED COMPONENTS CanvasPainter)
     target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter)

For more details, see the Build with CMake overview.

## Class Reference

Qt Canvas Painter C++ Classes

## Examples

All examples

## Licenses and Attributions

Qt Canvas Painter runtime library is available under commercial licenses from The Qt Company. In addition, it is available under the GNU General Public License, version 3.

See Qt Licensing for further details.

Furthermore, Qt Canvas Painter in 6.11.1 may contain third party modules under the following permissive licenses:

NanoVG, version f93799c | zlib License