I'm trying to use a QGLWIDGET to test if my app. runs faster.
I see how the svgviewer example is faster when using it.
I have used a similar code :
G_view->setViewport(glwidget);
glwidget = new QGLWidget(QGLFormat(QGL::SampleBuffers));
G_view->setViewport(glwidget);
To copy to clipboard, switch view to plain text mode
This is my paintEvent code for a QGraphicsView based widget, where I apply the transform and finally call to the internal paintevent
.....
this->QGraphicsView::paintEvent(event);
}
void A_Gview2D::paintEvent(QPaintEvent *event) {
QPainter painter (this->viewport());
.....
this->QGraphicsView::paintEvent(event);
}
To copy to clipboard, switch view to plain text mode
I see a 'white' empty space and I have the errors:
A paint device can only be painted by one painter at a time.
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
etc.
It seems that it is not so easy to apply. Any help ?
Thanks.
Bookmarks