Fix errors sometimes caused by QT_PROPERTY

This seems to be a problem of older Qt5 versions.