Hello, friends.
Sorry for my English in this post 
I'm writing application, which uses qgraphicsview with opengl render to show map and objects on it. As it said in docs:
" To render using OpenGL, simply call setViewport(new QGLWidget). QGraphicsView takes ownership of the viewport widget."
It works fine as i thought 
Part of code looks like this:
view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
view->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
/* add map to scene... */
scene
->addPixmap
(QPixmap(mapInfo
->path
));
/* sdd some items */
scene->addWidget(new mapObject("test1", type, scene));
scene->addWidget(new mapObject("test2", type, scene));
scene = new QGraphicsScene(this);
view = new QGraphicsView(scene);
view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
view->setDragMode(QGraphicsView::ScrollHandDrag);
view->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
view->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
/* add map to scene... */
scene->addPixmap(QPixmap(mapInfo->path));
/* sdd some items */
scene->addWidget(new mapObject("test1", type, scene));
scene->addWidget(new mapObject("test2", type, scene));
To copy to clipboard, switch view to plain text mode
*look at pic1 to see how it looks when it works *
Everything works fine on my machine. But then i've tested program on netbook with graphic card, which support only opengl version 1.4. And here begun problem...
I used to disable SampleBuffers because netbook's video card don't support it.
*look at pic2, which shows my problem, but i forgot it at work so i had to made it in paint
*
This happen when i call windows task manager or hibernate or "sleep" netbook... But when i resize, maximaze or minimaze window graphicsview repaint itself and works fine until next taskmanager or hibernate 
Also i had problem with starting my application... After adding item on scene, it turns to black, but this was fixed by calling updateGL() after creating graphicsview....maybe it's not right...
Can u give me any advice, please? maybe i'm doing something wrong?
ps. works fine on win7 with nvidia 260gt, works bad on intel 945 integrated video on my netbook =(((
Bookmarks