Hi friends,
Im facing a problem of adding a QGLWidget as a viewport of the GraphicsView ...
when i tried to show my QGLWidget it looks perfect ..
but when i tried to add as a QGrraphicsView viewport() im facing a problem...
this is how i added..
scene
->setSceneRect
(QRectF(0,
0,
1024,
800));
GLWidget *window = new GLWidget();
window->makeCurrent();
view.setViewport(window);
view.setScene(scene);
view.show();
QApplication app(argc, argv);
QGraphicsScene *scene = new QGraphicsScene;
scene->setSceneRect(QRectF(0, 0, 1024, 800));
QGraphicsView view;
GLWidget *window = new GLWidget();
window->makeCurrent();
view.setViewport(window);
view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
view.setScene(scene);
view.show();
To copy to clipboard, switch view to plain text mode
the window looks white blank screen.. but when i show GLWidget alone it looks ok.. i drawn a polygon on a balck background QGLWidget ..
please help me ... thanks in advance !
Bookmarks