On this page

Qt Canvas2D QML types

This module is in technology preview and is subject to change.

This QML module contains a Canvas2D element for Qt Quick. To use the Canvas2D, import the module with the following line:

import QtCanvas2D

Canvas2D QML Types

Canvas2D

Provides a 2D canvas item enabling drawing via JavaScript

Canvas2DContext

Provides 2D context for drawing on a Canvas2D item

boxgradient2d

Provides boxgradient2d type matching to QCanvasBoxGradient

boxshadow2d

Provides boxshadow2d type matching to QCanvasBoxShadow

conicalgradient2d

Provides conicalgradient2d type matching to QCanvasConicalGradient

gridpattern2d

Provides gridpattern2d type matching to QCanvasGridPattern

imagepattern2d

Provides imagepattern2d type matching to QCanvasImagePattern

lineargradient2d

Provides lineargradient2d type matching to QCanvasLinearGradient

path2d

Provides path2d type, a painter path container matching to QCanvasPath

radialgradient2d

Provides radialgradient2d type matching to QCanvasRadialGradient

transform2d

Provides transform2d type,a 3x3 2D transformation matrix, matching to QTransform

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.