Have a go hero – Wrapping Qt objects into Python objects

At this point, you should be experienced enough to try and implement a wrapper for the QObject instances to expose signals and slots to Python scripting. If you decide to pursue the goal, https://docs.python.org/3/ will be your best friend, especially the section about extending Python with C++. Remember that QMetaObject provides information about the properties and methods of Qt objects and QMetaObject::invokeMethod() allows you to execute a method by its name. This is not an easy task, so don't be hard on yourself if you are not able to complete it. You can always return to it once you gain more experience in using Qt and Python.

Before you head on to the next chapter, try testing ...

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.