VS2019编译VTK-9.1.0+Qt5.15.2

博客内容涉及在VS2019和Qt5.15.2环境中,尝试将QML与VTK9.1.0进行整合以实现3D渲染,但遇到QML运行结果不理想和QML加VTK失败的问题。作者在`pro`文件中详细配置了VTK的库路径和依赖,并列举了引用的VTK库。尽管编译无警告和错误,但在尝试加载STL文件时遇到了`fileUrl is not defined`的错误。作者参考了多个资源尝试解决,但问题仍未解决。
摘要由CSDN通过智能技术生成

目录

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:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\include"
INCLUDEPATH += "C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\include\vtk-9.1"
INCLUDEPATH += "C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\include\vtk-9.1\vtkhdf5"

DEPENDPATH += "C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\bin"

DEPENDPATH += "C:\Qt\5.15.2\msvc2019_64\bin"

DEPENDPATH += "C:\Qt\5.15.2\msvc2019_64\qml"

#LIBS+= -L$$quote("C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib")

win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkcgns-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkChartsCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonColor-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonComputationalGeometry-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonDataModel-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonExecutionModel-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonMath-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonMisc-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonPython-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonSystem-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkCommonTransforms-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkDICOMParser-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkDomainsChemistry-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkDomainsChemistryOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkdoubleconversion-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkexodusII-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkexpat-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersAMR-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersExtraction-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersFlowPaths-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersGeneral-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersGeneric-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersGeometry-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersHybrid-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersHyperTree-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersImaging-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersModeling-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersParallel-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersParallelImaging-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersPoints-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersProgrammable-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersPython-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersSelection-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersSMP-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersSources-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersStatistics-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersTexture-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersTopology-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkFiltersVerdict-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkfmt-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkfreetype-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkGeovisCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkgl2ps-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkglew-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkGUISupportQt-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkGUISupportQtQuick-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkGUISupportQtSQL-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkhdf5-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkhdf5_hl-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingColor-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingFourier-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingGeneral-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingHybrid-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingMath-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingMorphological-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingSources-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingStatistics-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkImagingStencil-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkInfovisCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkInfovisLayout-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkInteractionImage-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkInteractionStyle-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkInteractionWidgets-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOAMR-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOAsynchronous-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOCGNSReader-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOChemistry-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOCityGML-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOCONVERGECFD-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOEnSight-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOExodus-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOExport-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOExportGL2PS-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOExportPDF-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOGeometry-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOHDF-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOImage-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOImport-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOInfovis-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOIOSS-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOLegacy-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOLSDyna-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOMINC-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOMotionFX-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOMovie-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIONetCDF-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOOggTheora-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOParallel-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOParallelXML-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOPLY-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOSegY-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOSQL-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkioss-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOTecplotTable-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOVeraOut-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOVideo-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOXML-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkIOXMLParser-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkjpeg-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkjsoncpp-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkkissfft-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtklibharu-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtklibproj-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtklibxml2-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkloguru-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtklz4-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtklzma-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkmetaio-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtknetcdf-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkogg-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkParallelCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkParallelDIY-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkpng-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkpugixml-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkPythonContext2D-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkPythonInterpreter-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingAnnotation-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingContext2D-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingContextOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingFreeType-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingGL2PSOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingImage-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingLabel-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingLOD-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingQt-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingSceneGraph-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingUI-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingVolume-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingVolumeOpenGL2-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkRenderingVtkJS-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtksqlite-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtksys-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkTestingRendering-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtktheora-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtktiff-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkverdict-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkViewsContext2D-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkViewsCore-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkViewsInfovis-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkViewsQt-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkWrappingPythonCore3.9-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkWrappingTools-9.1.lib)
win32:LIBS += $$quote(C:\Users\pgjgg\Desktop\C++_learn\VTK-9.1.0\VTK-release\lib\vtkzlib-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博客

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yantuguiguziPGJ

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值