What just happened?

During this exercise, we made use of the powerful API of Qt's raster graphics engine to complement an existing set of Qt Quick items with a simple functionality. This is otherwise very hard to achieve using predefined Qt Quick elements and even harder to implement using OpenGL. We agreed to take a small performance hit in exchange for having to write just about a hundred lines of code to have a fully working solution. Remember to register the class with QML if you want to use it in your code:

qmlRegisterUncreatableType<OutlineTextItemBorder>(     "OutlineTextItem", 1, 0, "OutlineTextItemBorder", "");qmlRegisterType<OutlineTextItem>(     "OutlineTextItem", 1, 0, "OutlineTextItem");

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.