Giter Club home page Giter Club logo

Comments (9)

ilcamf avatar ilcamf commented on July 2, 2024

from cloudviewer.

YanCao12138 avatar YanCao12138 commented on July 2, 2024

就是在Qt界面添加QVTKWidget控件后,ui_cloudviewer.h头文件中自动包含"QVTKWidget.h"头文件,vs里显示无此头文件,所以想请教您有没有遇到这样的问题

from cloudviewer.

Mengyanduan avatar Mengyanduan commented on July 2, 2024

1.在你的VTK安装目录下找找有没有这个头文件,查看是否是路径的问题;
2.我猜测大概率是因为你的VTK库没有正确编译安装,所以无法找到相关的h文件,虽然安装PCL的时候有预编译好的VTK库,但是这个和Qt结合编译用于显示点云并不适配,也就是说你添加的那个QVTKWidget控件是不合适的,具体原因不详。解决办法是,结合你安装的Qt重新单独编译VTK库,然后替换掉原来的安装文件。具体步骤可查阅相关博客,有很多。

from cloudviewer.

YanCao12138 avatar YanCao12138 commented on July 2, 2024

好的,谢谢您能解答。我没有配置VTK,因为我看qt与pcl结合的一般都没有配置vtk,也猜测了会不会是这个原因导致的。
但现在我发现自己的pcl是装的是x86的,而qt与vs结合只能建立64的工程文件,所以我想先看看是不是这个原因导致的。还是很感谢您的解答。

from cloudviewer.

nightn avatar nightn commented on July 2, 2024

@YanCao12138 你好,QVTKWidget.h 头文件是由 vtk 库提供的。但我观察到,PCL 在 3rdParty 中提供的 vtk 并不完整,其中就没有与 QT 相关的头文件以及二进制文件,事实上如果仅使用 PCL 提供的 vtk,在 Qt Designer 中也不会出现 QVTKWidget 控件,而这是 CloudViewer 所必需的。
建议根据你所使用的 PCL 的版本,手动编译对应版本的 vtk,并替换 PCL 3rdParty 中的 vtk。
非常感谢 @DuanMengyan 的回答,事实上已经非常完整了。

from cloudviewer.

YanCao12138 avatar YanCao12138 commented on July 2, 2024
  好的,大致明白了您的意思,谢谢您。但是奇怪的是, 我在没有配置vtk的情况下,我的Qt Designer 中任然有QVTKWidget 控件,在我拖动该控件到界面上后,ui_cloudviewer.h头文件中也更新了对QVTKWidget 控件的定义以及出现了"QVTKWidget.h"头文件,就是一直会有红色下划线显示“无法打开源文件”。
 目前还是比较怀疑vs,pcl,qt需要同样配置64位的,之前我的pcl是x86模式的,vs、qt都是64的,目前还在尝试中,不知您觉得这样是否有必要。
 还是非常感谢您的回复,谢谢。

from cloudviewer.

nightn avatar nightn commented on July 2, 2024

据我所知,默认安装的 Qt Designer 中并未提供 QVTKWidget 控件(即下图所示控件)
qvtkwidget-in-designer
如果 designer 插件路径下(在我的机器上是 QT_DIR/5.10.1/msvc2017_64/plugins/designer/)存在 QVTKWidgetPlugin.dll 文件,那么这个控件就会显示。但默认安装的情况下,这个文件并不存在,而是需要从手动编译好的 vtk 库中拷贝过来。
@YanCao12138 你的这个控件之所以存在,我想可能是因为你先前配置过了,你可以到对应路径查看,通过移除和添加这个 dll 文件,可以观察到 designer 控件栏的变化。
至于各个库的版本,我都是采用 win64 的。

from cloudviewer.

YanCao12138 avatar YanCao12138 commented on July 2, 2024

是的,我在配置Qt的时候,从一个博客上下载了两个“.dll“文件放进了"F:\Qt\Qt5.7.0\5.7\msvc2013_64\plugins\designer"文件下,一个是"QVTKWidgetPlugin.dll",一个QVTKWidgetPlugin的Object File Library 文件。

from cloudviewer.

gisnewbird avatar gisnewbird commented on July 2, 2024

看上面的讨论已经很充分了吧,vtk还是要自己编译一下才会有QVTKWidge.h的文件

from cloudviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.