Have a go hero – Implementing the remaining conversions

Now, you should be able to implement other constructors and conversions for QtPythonValue that operates on the float, bool, or even on QDate and QTime types. Try implementing them yourself. If needed, take a look at the Python documentation to find appropriate calls that you should use.

The documentation for Python 3.5 is available online at https://docs.python.org/3.5/. If you've installed a different Python version, you can find the documentation for your version on the same website.

We'll give you a head start by providing a skeleton implementation of how to convert QVariant to QtPythonValue. This is especially important, because Python makes use of two types whose equivalents are ...

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.