C++ Examples from Qt documentation translated into Python