[vtkusers] Using QTPainter with QVTKWidget

Marc Cotran marc at cotran.ca
Mon Oct 16 09:39:54 EDT 2006


Anja Ende wrote:
>
> Has anyone been able to successfully use QPainter methods in QVTKWidget.
>
> So, I have derived a class from QVTKWidget and override the paintEvent 
> method as follows:
>
> void QTVTKWidget::paintEvent( QPaintEvent * event)
> {
>             QVTKWidget::paintEvent(event);
>             QPainter painter(this);
>             ....
> }
>
> This however,  returns a run time error as in it could not create the 
> painter object. The error is:
>
> Painter::begin(), paintdevice returned engine == 0, type: 1
>
> Just wondering if someone has been able to use this successfully.
Hi Anja,

I tried this and failed also. I assume you want to draw stuff over the 
main render window (so did I). If you find the solution, I would love to 
hear it. Meanwhile, I'll try to get it working again...

Marc



More information about the vtkusers mailing list