Question on Qt example "boxes"
-
I am trying integrating graphics - view framework with OpenGL.
Qt's example called "boxes" ( which located in $${QT_DIR}/example/widgets/graphicsview/boxes) is so good and include many functionalities which are useful in my project. After carefully reading source code, I found that this example(in main.cpp) uses a QGLWidget to fill QGraphicsView::setViewport() function to offer OpenGL support, if not so, any code based on OpenGL will take no effect. However in my opinion this dummy QGLWidget just offers QOpenGLContext, is there a more elegant way to solve this problem?