我是靠谱客的博主 动听绿草,最近开发中收集的这篇文章主要介绍VS2019编译VTK-9.1.0+Qt5.15.21  QML运行结果2  编译无警告和错误3  修改pro文件4  QML加VTK的失败尝试5  参考链接,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

目录

1  QML运行结果

2  编译无警告和错误

3  修改pro文件

4  QML加VTK的失败尝试

5  参考链接


1  QML运行结果

2  编译无警告和错误

3  修改pro文件

C/VTK/VTKTest at master · 975150313/C (github.com)

QT += quick quickcontrols2  qml
CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
msvc:QMAKE_CXXFLAGS += /utf-8
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

HEADERS += 
    qquickvtk.h 
    qquickvtkrenderer.h

SOURCES += main.cpp 
    qquickvtk.cpp 
    qquickvtkrenderer.cpp

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

INCLUDEPATH+="$$PWD"

#=====================================VTK_ITK===================================

INCLUDEPATH += "C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaseinclude"
INCLUDEPATH += "C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaseincludevtk-9.1"
INCLUDEPATH += "C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaseincludevtk-9.1vtkhdf5"

DEPENDPATH += "C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releasebin"

DEPENDPATH += "C:Qt5.15.2msvc2019_64bin"

DEPENDPATH += "C:Qt5.15.2msvc2019_64qml"

#LIBS+= -L$$quote("C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselib")

win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkcgns-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkChartsCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonColor-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonComputationalGeometry-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonDataModel-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonExecutionModel-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonMath-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonMisc-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonPython-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonSystem-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkCommonTransforms-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkDICOMParser-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkDomainsChemistry-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkDomainsChemistryOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkdoubleconversion-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkexodusII-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkexpat-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersAMR-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersExtraction-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersFlowPaths-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersGeneral-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersGeneric-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersGeometry-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersHybrid-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersHyperTree-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersImaging-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersModeling-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersParallel-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersParallelImaging-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersPoints-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersProgrammable-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersPython-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersSelection-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersSMP-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersSources-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersStatistics-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersTexture-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersTopology-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkFiltersVerdict-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkfmt-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkfreetype-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkGeovisCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkgl2ps-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkglew-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkGUISupportQt-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkGUISupportQtQuick-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkGUISupportQtSQL-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkhdf5-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkhdf5_hl-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingColor-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingFourier-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingGeneral-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingHybrid-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingMath-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingMorphological-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingSources-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingStatistics-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkImagingStencil-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkInfovisCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkInfovisLayout-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkInteractionImage-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkInteractionStyle-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkInteractionWidgets-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOAMR-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOAsynchronous-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOCGNSReader-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOChemistry-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOCityGML-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOCONVERGECFD-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOEnSight-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOExodus-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOExport-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOExportGL2PS-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOExportPDF-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOGeometry-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOHDF-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOImage-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOImport-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOInfovis-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOIOSS-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOLegacy-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOLSDyna-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOMINC-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOMotionFX-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOMovie-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIONetCDF-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOOggTheora-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOParallel-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOParallelXML-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOPLY-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOSegY-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOSQL-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkioss-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOTecplotTable-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOVeraOut-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOVideo-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOXML-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkIOXMLParser-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkjpeg-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkjsoncpp-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkkissfft-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtklibharu-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtklibproj-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtklibxml2-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkloguru-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtklz4-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtklzma-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkmetaio-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtknetcdf-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkogg-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkParallelCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkParallelDIY-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkpng-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkpugixml-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkPythonContext2D-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkPythonInterpreter-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingAnnotation-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingContext2D-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingContextOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingFreeType-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingGL2PSOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingImage-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingLabel-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingLOD-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingQt-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingSceneGraph-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingUI-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingVolume-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingVolumeOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkRenderingVtkJS-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtksqlite-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtksys-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkTestingRendering-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtktheora-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtktiff-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkverdict-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkViewsContext2D-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkViewsCore-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkViewsInfovis-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkViewsQt-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkWrappingPythonCore3.9-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkWrappingTools-9.1.lib)
win32:LIBS += $$quote(C:UserspgjggDesktopC++_learnVTK-9.1.0VTK-releaselibvtkzlib-9.1.lib)



#=====================================VTK_ITK===================================

4  QML加VTK的失败尝试

nicanor-romero/QtVtk: An integration between Qt Quick Controls 2 and VTK for 3D rendering (github.com)

​​​​​​

报错:

qrc:/resources/main.qml:191: ReferenceError: fileUrl is not defined

在VS2019和QT5.15.2进行debug,没有解决。

尝试了如下方法:

import Qt.labs.platform 1.1

canvasHandler.openModel(file);

// bool isModelExtensionValid(const QUrl &modelPath) const;

    bool isModelExtensionValid( QUrl modelPath) ;

类似的:

FONQRI/VtkWithQmlExample: This is an example of loading and showing STL files with VTK and integration with QML. (github.com)

5  参考链接

(600条消息) 初步编译QT5.15.2+VS2019+VTK8.1.0_yantuguiguziPGJ的博客-CSDN博客

(587条消息) 三战VS2019编译VTK7.1+Qt5.15.2_yantuguiguziPGJ的博客-CSDN博客
(587条消息) vtk9.0+vs2019+cmake+Qt编译库_simple的博客-CSDN博客

(587条消息) VTK笔记-Qt5.12.11编译VTK9.0.3-QVTKOpenGLNativeWidget_黑山老妖的博客-CSDN博客

(587条消息) QQuick Vtk QML C++_douzi949389的博客-CSDN博客

(600条消息) VTK9.1.0在Windows10+VS2019+Qt 5.15.2环境下编译安装以及VTK应用于QT_isongxw的博客-CSDN博客

最后

以上就是动听绿草为你收集整理的VS2019编译VTK-9.1.0+Qt5.15.21  QML运行结果2  编译无警告和错误3  修改pro文件4  QML加VTK的失败尝试5  参考链接的全部内容,希望文章能够帮你解决VS2019编译VTK-9.1.0+Qt5.15.21  QML运行结果2  编译无警告和错误3  修改pro文件4  QML加VTK的失败尝试5  参考链接所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(83)

评论列表共有 0 条评论

立即
投稿
返回
顶部