Time for action – Creating an item for drawing outlined text

The goal of the current exercise is to be able to make the following QML code work:

import QtQuick 2.9import QtQuick.Window 2.3import OutlineTextItem 1.0Window {    visible: true    width: 800    height: 400    title: qsTr("Hello World")    Rectangle {        anchors.fill: parent        OutlineTextItem {            anchors.centerIn: parent            text: "This is outlined text"            fontFamily: "Arial"            fontPixelSize: 64            color: "#33ff0000"            antialiasing: true            border {                color: "blue"                width: 2                style: Qt.DotLine            }        }    }}

Then, it produces the following result:

Start with an empty Qt Quick application project. Create a new C++ class and call ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.