O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required