Cache PythonQtObjectPtr to make calling Python code faster