[vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)

KOZLOVSKY Nicolas nicolas.kozlovsky at fr.thalesgroup.com
Tue Jan 26 03:21:23 EST 2016


Hi
Thanks for the files, I looked to the files and I saw that we did the same things for openglRenderer initialization.

The difference I saw is the use of the render :

QVTKWidget *vtkWidget = new QVTKWidget;
setCentralWidget(vtkWidget);

vtkSmartPointer<vtkContextView> contextView = vtkSmartPointer<vtkContextView>::New();
contextView.Get()->SetRenderWindow(vtkWidget->GetRenderWindow());
contextView->GetRenderWindow()->SetSize(800, 800);
this->resize(800, 800);

In fact when in debug mode, the run stops in file vtkContextActor.cxx in function RenderOverlay

this->Context->GetDevice()->SetViewportSize(vtkVector2i(size));

It seems that the context is not initialized.

De : MOUSSAUD David 244079 [mailto:David.MOUSSAUD at cea.fr]
Envoyé : lundi 25 janvier 2016 14:18
À : KOZLOVSKY Nicolas; vtkusers at vtk.org
Objet : RE:Error at runtime using qmake for building project (vtkContextDevice2D)


Hi Nicolas,

A couple weeks ago, i have joined my qmake project to an other thread (http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html)



Here it is again attached in this email.

I'm using also vtk 6.3.



Regards,

David.



________________________________
De : vtkusers [vtkusers-bounces at vtk.org] de la part de KOZLOVSKY Nicolas [nicolas.kozlovsky at fr.thalesgroup.com]
Envoyé : lundi 25 janvier 2016 12:57
À : vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Objet : [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)
Hi all

I try to use QVTKWidget in a big project using qmake for building.
Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 :

In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27
Error: no override found for 'vtkContextDevice2D'.

I read a lot about this and put in the main.cpp :

#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL)
VTK_MODULE_INIT(vtkInteractionStyle)

I have always the same error at runtime.
I try also to add this directive to .pro file:

DEFINES += "\"vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\""

But again same error at runtime.

If now I build the project with cmake, I have no problem everything is running fine.
How can I build with qmake ???

Thanks for any clues

Nicolas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160126/2b833c00/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: M  Nicolas KOZLOVSKY.vcf
Type: text/x-vcard
Size: 1589 bytes
Desc: M  Nicolas KOZLOVSKY.vcf
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160126/2b833c00/attachment.vcf>


More information about the vtkusers mailing list