Python scripting

Qt QML is an environment that is designed to be part of the Qt world. Since not everyone knows or likes JavaScript, we will present another language that can easily be used to provide scripting environments for games that are created with Qt. Just be aware that this will not be an in-depth description of the environment—we will just show you the basics that can provide foundations for your own research.

A popular language used for scripting is Python. There are two variants of Qt bindings that are available for Python: PySide2 and PyQt. PySide2 is the official binding that is available under LGPL. PyQt is a third-party library that is available under GPL v3 and a commercial license.

PyQt is not available under LGPL, so for ...

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.