1 Generic Warning
VTK 开发 中是到 vtkOutputWindow 弹窗并提示Generic Warning:…
vtkOutputWindow 弹窗
解决方法:
添加:
#include <vtkOutputWindow.h>
在 main.cpp函数中添加:
vtkOutputWindow::SetGlobalWarningDisplay(0); 即可
#include <vtkOutputWindow.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
vtkOutputWindow::SetGlobalWarningDisplay(0);
window w;
w.show();
return a.exec();
}
2.QVTKWidget was deprecated for VTK 8.1 and will be removed in a future version
You should use QVTKOpenGLWidget instead.
You can disable deprecation warning if absolutely needed by setting the cmake variable :
VTK_LEGACY_SILENT:ON
3.“QWidget: Must construct a QApplication before a QWidget”
最后查找的原因是vlc-qt库的debug和release版本混用的原因
解决方案:
CONFIG += debug_and_release
CONFIG(debug,debug | release){
LIBS += -L$$PWD/ -lTestDll
}else{
LIBS += -L$$PWD/ -lTestDlld
}