If you take a look at the Diagram example, you will see, that enum type is created for every class that is added to QGraphicsScene.
I suggest you do the same thing.
I try to use commandline -graphicssystem switch and QT_GRAPHICSSYSTEM environment variable to set graphicssystem to "raster" and "opengl". But seems there is no difference. So i want to find a way to get the value.