<div dir="ltr"><div>Zoltan,</div><div>This is unrelated to the error you are seeing however:</div><div><br></div>For Qt5 you'll need to use QVTKOpenGLWidget rather than QVTKWidget.  See<div><a href="https://lorensen.github.io/VTKExamples/site/Cxx/">https://lorensen.github.io/VTKExamples/site/Cxx/</a><br></div><div>All examples are converted to Qt5. Also, VTK master has a number of examples that have been converted to Qt5: Examples/GUI/Qt</div><div><br></div><div>Hope this helps,</div><div>Dan</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs <span dir="ltr"><<a href="mailto:Zoltan.Kovacs@esi-group.com" target="_blank">Zoltan.Kovacs@esi-group.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
In CMake I generated a solution project of VTK-8.0.1 with Qt5 support for MSVS2013. After having run the ALL_BUILD and INSTALL projects with the install prefix C:\VTK\8.0.1 in VM2013 I could installed the Win32 bit binaries of VTK 8.0.1 in that folder. The header files and the libraries are located in<br>
C:\VTK\8.0.1\include\vtk-8.0   and<br>
C:\VTK\8.0.1\lib.<br>
<br>
I copied the file QVTKWidgetPlugin.dll from the VTK binary folders to the plugin folder of QTCreator, which uses QT 5.8 msvs2013 32 bit version.<br>
<br>
Then I set the include and library paths and added all the VTK libary files from C:\VTK\8.0.1\lib for the linker setting in the project file<br>
of a QT application in QtCreator:<br>
<br>
INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0<br>
LIBS += -LC:\VTK\8.0.1\lib<br>
<br>
LIBS += -lvtkRenderingLabel-8.0 \<br>
-lvtkRenderingLOD-8.0 \<br>
-lvtkRenderingOpenGL2-8.0 \<br>
-lvtkRenderingQt-8.0 \<br>
-lvtkRenderingVolume-8.0 \<br>
-lvtkRenderingVolumeOpenGL2-8.<wbr>0 \<br>
-lvtksqlite-8.0 \<br>
-lvtksys-8.0 \<br>
-lvtkTestingGenericBridge-8.0 \<br>
-lvtkTestingIOSQL-8.0 \<br>
-lvtkTestingRendering-8.0 \<br>
-lvtktiff-8.0 \<br>
-lvtkverdict-8.0 \<br>
-lvtkViewsContext2D-8.0 \<br>
-lvtkViewsCore-8.0 \<br>
-lvtkViewsInfovis-8.0 \<br>
-lvtkViewsQt-8.0 \<br>
-lvtkzlib-8.0 \<br>
-lvtkalglib-8.0 \<br>
-lvtkChartsCore-8.0 \<br>
-lvtkCommonColor-8.0 \<br>
-lvtkCommonComputationalGeomet<wbr>ry-8.0 \<br>
-lvtkCommonCore-8.0 \<br>
-lvtkCommonDataModel-8.0 \<br>
-lvtkCommonExecutionModel-8.0 \<br>
-lvtkCommonMath-8.0 \<br>
-lvtkCommonMisc-8.0 \<br>
-lvtkCommonSystem-8.0 \<br>
-lvtkCommonTransforms-8.0 \<br>
-lvtkDICOMParser-8.0 \<br>
-lvtkDomainsChemistry-8.0 \<br>
-lvtkDomainsChemistryOpenGL2-8<wbr>.0 \<br>
-lvtkexoIIc-8.0 \<br>
-lvtkexpat-8.0 \<br>
-lvtkFiltersAMR-8.0 \<br>
-lvtkFiltersCore-8.0 \<br>
-lvtkFiltersExtraction-8.0 \<br>
-lvtkFiltersFlowPaths-8.0 \<br>
-lvtkFiltersGeneral-8.0 \<br>
-lvtkFiltersGeneric-8.0 \<br>
-lvtkFiltersGeometry-8.0 \<br>
-lvtkFiltersHybrid-8.0 \<br>
-lvtkFiltersHyperTree-8.0 \<br>
-lvtkFiltersImaging-8.0 \<br>
-lvtkFiltersModeling-8.0 \<br>
-lvtkFiltersParallel-8.0 \<br>
-lvtkFiltersParallelImaging-8.<wbr>0 \<br>
-lvtkFiltersPoints-8.0 \<br>
-lvtkFiltersProgrammable-8.0 \<br>
-lvtkFiltersSelection-8.0 \<br>
-lvtkFiltersSMP-8.0 \<br>
-lvtkFiltersSources-8.0 \<br>
-lvtkFiltersStatistics-8.0 \<br>
-lvtkFiltersTexture-8.0 \<br>
-lvtkFiltersTopology-8.0 \<br>
-lvtkFiltersVerdict-8.0 \<br>
-lvtkfreetype-8.0 \<br>
-lvtkGeovisCore-8.0 \<br>
-lvtkgl2ps-8.0 \<br>
-lvtkglew-8.0 \<br>
-lvtkGUISupportQt-8.0 \<br>
-lvtkGUISupportQtSQL-8.0 \<br>
-lvtkhdf5_hl-8.0 \<br>
-lvtkhdf5-8.0 \<br>
-lvtkImagingColor-8.0 \<br>
-lvtkImagingCore-8.0 \<br>
-lvtkImagingFourier-8.0 \<br>
-lvtkImagingGeneral-8.0 \<br>
-lvtkImagingHybrid-8.0 \<br>
-lvtkImagingMath-8.0 \<br>
-lvtkImagingMorphological-8.0 \<br>
-lvtkImagingSources-8.0 \<br>
-lvtkImagingStatistics-8.0 \<br>
-lvtkImagingStencil-8.0 \<br>
-lvtkInfovisCore-8.0 \<br>
-lvtkInfovisLayout-8.0 \<br>
-lvtkInteractionImage-8.0 \<br>
-lvtkInteractionStyle-8.0 \<br>
-lvtkInteractionWidgets-8.0 \<br>
-lvtkIOAMR-8.0 \<br>
-lvtkIOCore-8.0 \<br>
-lvtkIOEnSight-8.0 \<br>
-lvtkIOExodus-8.0 \<br>
-lvtkIOExport-8.0 \<br>
-lvtkIOExportOpenGL2-8.0 \<br>
-lvtkIOGeometry-8.0 \<br>
-lvtkIOImage-8.0 \<br>
-lvtkIOImport-8.0 \<br>
-lvtkIOInfovis-8.0 \<br>
-lvtkIOLegacy-8.0 \<br>
-lvtkIOLSDyna-8.0 \<br>
-lvtkIOMINC-8.0 \<br>
-lvtkIOMovie-8.0 \<br>
-lvtkIONetCDF-8.0 \<br>
-lvtkIOParallel-8.0 \<br>
-lvtkIOParallelXML-8.0 \<br>
-lvtkIOPLY-8.0 \<br>
-lvtkIOSQL-8.0 \<br>
-lvtkIOTecplotTable-8.0 \<br>
-lvtkIOVideo-8.0 \<br>
-lvtkIOXML-8.0 \<br>
-lvtkIOXMLParser-8.0 \<br>
-lvtkjpeg-8.0 \<br>
-lvtkjsoncpp-8.0 \<br>
-lvtklibharu-8.0 \<br>
-lvtklibxml2-8.0 \<br>
-lvtkLocalExample-8.0 \<br>
-lvtklz4-8.0 \<br>
-lvtkmetaio-8.0 \<br>
-lvtknetcdf_c++ \<br>
-lvtkNetCDF-8.0 \<br>
-lvtkoggtheora-8.0 \<br>
-lvtkParallelCore-8.0 \<br>
-lvtkpng-8.0 \<br>
-lvtkproj4-8.0 \<br>
-lvtkRenderingAnnotation-8.0 \<br>
-lvtkRenderingContext2D-8.0 \<br>
-lvtkRenderingContextOpenGL2-8<wbr>.0 \<br>
-lvtkRenderingCore-8.0 \<br>
-lvtkRenderingFreeType-8.0 \<br>
-lvtkRenderingGL2PSOpenGL2-8.0 \<br>
-lvtkRenderingImage-8.0 \<br>
<br>
<br>
However, if I add a QVTKWidget on the UI file of the application, include the file QVTKWidget.h in the header file of the application and I try to link it in QtCreator with the 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain of QtCreator) sends error messages for unresolved external symbols for all the functions/classes belonging to the QVTKWidget, such as<br>
<br>
distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class QWidget *,class QFlags<enum Qt::WindowType>)" (__imp_??0QVTKWidget@@QAE@PAVQ<wbr>Widget@@V?$QFlags@W4WindowType<wbr>@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_DistortionPage::setupUi(cla<wbr>ss QWidget *)" (?setupUi@Ui_DistortionPage@@Q<wbr>AEXPAVQWidget@@@Z)<br>
<br>
<br>
It seems that the linker could not find the libary for the QVTKWidget plugin, which is loaded since I could chose QtWidget from the widget list in the UI form editor in QtCreator. I do not see any ABI issue here since I use the 32 bit mscv2103 version of Qt and I also compiled and linked the 32 bit version of VTK libaries and plugin files with MSVS2013. I am wondering if anybody could make VTK-8.1 working with Qt. Thanks a lot.<br>
<br>
Kind regars,<br>
Zoltan<br>
<br>
Regards,<br>
Zoltan<br>
<br>
Am 09.10.2017 um 07:34 schrieb <a href="mailto:support@qt.io" target="_blank">support@qt.io</a>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Zoltan,<br>
<br>
I don't know how the widget should be installed or set up in a project, but you could just search for the header file and point INCLUDEPATH to the folder that contains it.<br>
<br>
Regards,<br>
Joni<br>
<br>
On 06 October 2017 at 18:26:00 EEST <a href="mailto:Zoltan.Kovacs@esi-group.com" target="_blank">Zoltan.Kovacs@esi-group.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Joni,<br>
<br>
I see. However I found MSCV2013 32 bit version for Qt 5.8. I install<br>
that version and I built the VTK binaries for win32 platform with<br>
MVS2013. After having copied the VTK plugin file into the plugin folder<br>
of QtCreator I could launch it successfully. The QVTKWidget is in the<br>
Widget list of QtCreator now. I could insert a QVTKWidget in the UI form<br>
as well. The only problem now is that QtCreator cannot find the header<br>
file for QVTKWidget. It is not cleat how to set the INCLUDEPATH in the<br>
project file since VS2103 did not create a separate include folder in<br>
the target folder C:/VTK/bin for the VTK binaries. Only the library<br>
files have a separate folder, C:/VTK/bin/lib/Release.<br>
<br>
Regards,<br>
Zoltan<br>
<br>
Am 06.10.2017 um 12:08 schrieb <a href="mailto:support@qt.io" target="_blank">support@qt.io</a>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Zoltan,<br>
<br>
On 06 October 2017 at 13:00:00 EEST <a href="mailto:Zoltan.Kovacs@esi-group.com" target="_blank">Zoltan.Kovacs@esi-group.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Joni,<br>
<br>
Thank you very much for your answer. Then I try to install everything<br>
from scratch. The only prolem is I have only MSVC 2103 and the only<br>
option in the selection list of the online installer for MSVC 2013 is<br>
the 64 bit version. Is there somewhere an installer on your website wich<br>
provides a relatively new Qt version with MSVC 2103 32 bit version?<br>
Thank you very much for your help.<br>
</blockquote>
<br>
No, but you could compile it from source yourself. However, note that you cannot build plugins for new Qt Creator with MSVC 2013 as it uses different ABI. You could use MSVC 2015 or MSVC 2017.<br>
<br>
Or you could build 64bit version of Qt Creator from source with that Qt version you have installed.<br>
<br>
Regards,<br>
Joni<br>
--<br>
Joni Poikelin<br>
Software Engineer,<br>
The Qt Company<br>
–<br>
FAQs - <a href="https://wiki.qt.io/KnowledgeBase:SupportFAQ" rel="noreferrer" target="_blank">https://wiki.qt.io/KnowledgeBa<wbr>se:SupportFAQ</a><br>
<br>
</blockquote></blockquote>
--<br>
Joni Poikelin<br>
Software Engineer,<br>
The Qt Company<br>
–<br>
FAQs - <a href="https://wiki.qt.io/KnowledgeBase:SupportFAQ" rel="noreferrer" target="_blank">https://wiki.qt.io/KnowledgeBa<wbr>se:SupportFAQ</a><br>
<br>
</blockquote>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
</blockquote></div><br></div>