Wrap generic PyObjects in an opaque value that can be passed to/from QML safely.