[python] More or less support Qt5 builds.
[core] Use Qt's metaobjectbuilder on Qt5.