[vtkusers] Re: Using QTPainter with QVTKWidget
Anja Ende
anja.ende at googlemail.com
Mon Oct 16 06:24:08 EDT 2006
Got it!
For anyone running into same problems, override as follows:
QPaintEngine* MyDerivedWidget::paintEngine() const
{
return QWidget::paintEngine();
}
On 16/10/06, Anja Ende <anja.ende at googlemail.com> wrote:
>
> Looks like I must construct my own paint engine. The QVTKWidget
> implementation is:
>
> QPaintEngine* QVTKWidget::paintEngine() const
> {
> return NULL;
> }
>
> Does anyone know how this could be created efficiently?
>
> Cheers,
> Anja
>
> On 16/10/06, Anja Ende <anja.ende at googlemail.com> wrote:
> >
> > Hi everyone,
> >
> > 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.
> >
> >
> > Cheers,
> >
> > Anja
>
>
>
>
> --
> Cheers,
>
> Anja
--
Cheers,
Anja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061016/26e11849/attachment.htm>
More information about the vtkusers
mailing list