[vtkusers] QVTKWidget paintEvent
Leonardo M. Ramé
l.rame at griensu.com
Fri Sep 24 09:52:48 EDT 2010
Hi, can paint over a QVTKWidget, however my drawings are lost when I
click on the widget or after setting a vtkImageViewer2 into it.
This is the code I use to paint over the QVTKWidget:
QPaintEngine * myWidget::paintEngine() const
{
return QWidget::paintEngine();
}
void myWidget::paintEvent(QPaintEvent * e)
{
QVTKWidget::paintEvent(e);
QPainter paint(this);
paint.setPen(Qt::white);
paint.drawRect(5,5,10,10);
}
How can I let my drawings repaint over the image viewer
--
Leonardo M. Ramé
http://leonardorame.blogspot.com
More information about the vtkusers
mailing list