<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texte de bulles Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.TextedebullesCar
{mso-style-name:"Texte de bulles Car";
mso-style-priority:99;
mso-style-link:"Texte de bulles";
font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
{mso-style-name:msochpdefault;
mso-style-priority:99;
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri","sans-serif";}
span.emailstyle17
{mso-style-name:emailstyle17;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi all<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Just to be sure, I tried with VTK 6.1.0 and it worked perfectly well with qmake compilation. I have tried also with VTK7.0 rc2, but same results as with VTK 6.3 </span><span lang=EN-US style='font-family:Wingdings;color:#1F497D'>è</span><span lang=EN-US style='color:#1F497D'> runtime error<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> KOZLOVSKY Nicolas <br><b>Envoyé :</b> mardi 26 janvier 2016 09:21<br><b>À :</b> vtkusers@vtk.org<br><b>Objet :</b> RE: Error at runtime using qmake for building project (vtkContextDevice2D)<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks for the files, I looked to the files and I saw that we did the same things for openglRenderer initialization.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>The difference I saw is the use of the render :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>QVTKWidget *vtkWidget = new QVTKWidget;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>setCentralWidget(vtkWidget);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>vtkSmartPointer<vtkContextView> contextView = vtkSmartPointer<vtkContextView>::New();<o:p></o:p></span></p><p class=MsoNormal><span lang=NL style='color:#1F497D'>contextView.Get()->SetRenderWindow(vtkWidget->GetRenderWindow());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>contextView->GetRenderWindow()->SetSize(800, 800);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>this->resize(800, 800);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>In fact when in debug mode, the run stops in file vtkContextActor.cxx in function RenderOverlay<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>this->Context->GetDevice()->SetViewportSize(vtkVector2i(size));<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>It seems that the context is not initialized.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> MOUSSAUD David 244079 [<a href="mailto:David.MOUSSAUD@cea.fr">mailto:David.MOUSSAUD@cea.fr</a>] <br><b>Envoyé :</b> lundi 25 janvier 2016 14:18<br><b>À :</b> KOZLOVSKY Nicolas; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br><b>Objet :</b> RE:Error at runtime using qmake for building project (vtkContextDevice2D)<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Hi Nicolas,<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>A couple weeks ago, i have joined my qmake project to an other thread (<a href="http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html">http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html</a>)<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Here it is again attached in this email. <o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>I'm using also vtk 6.3.<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Regards,<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>David.<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> <o:p></o:p></span></p><div><div class=MsoNormal align=center style='text-align:center'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:black'><hr size=2 width="100%" align=center></span></div><div id=divRpF663477><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> vtkusers [vtkusers-bounces@vtk.org] de la part de KOZLOVSKY Nicolas [nicolas.kozlovsky@fr.thalesgroup.com]<br><b>Envoyé :</b> lundi 25 janvier 2016 12:57<br><b>À :</b> <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br><b>Objet :</b> [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:black'><o:p></o:p></span></p></div><div><div><p class=MsoNormal><span style='color:black'>Hi all<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>I try to use QVTKWidget in a big project using qmake for building.</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 :</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>Error: no override found for 'vtkContextDevice2D'.</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>I read a lot about this and put in the main.cpp :</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>#include <vtkAutoInit.h></span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>VTK_MODULE_INIT(vtkRenderingOpenGL)</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>VTK_MODULE_INIT(vtkInteractionStyle)</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>I have always the same error at runtime.</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>I try also to add this directive to .pro file:</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>DEFINES += “\”vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\””</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>But again same error at runtime.</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>If now I build the project with cmake, I have no problem everything is running fine.</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>How can I build with qmake ???</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>Thanks for any clues</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'>Nicolas</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p></div></div></div></div></div></body></html>