The QML Canvas Element

Perhaps you have been trying to do more with QML than just using the basic elements like rectangles, text and images, or maybe you have been struggling to implement a user interface that doesn't map well into these basic elements. If so, the QML Canvas may be just the solution you are looking for.  In this post, we'll look at Canvas (1), a powerful and useful QML element that is part of Qt Quick.

Introduction

Integrating C++ with QML

Qt Quick's QML language makes it easy to do a lot of things, especially fancy animated user interfaces. However, there are some things that either can't be done or are not really suitable for implementing in QML. As we'll see, Qt makes it quite easy to expose C++ code to QML. In this blog post I'll show an example of doing this with a small but functional application.