1

i'm using point cloud library 1.6 pre built 32 bit for VS2010 on windows machine, and Qt version 5.2.

When try to include in my project, i have an issue:

Cannot open include file: 'QtGui/QWidget': No such file or directory

user2543127
  • 385
  • 10
  • 21
  • Try adding the includepath, where qt headers are located. But it is hard to guess with this little information provided. When does this problem occur? Where is it inluded? Eventually add some code and/or compiler output. – Sebastian Lange Apr 07 '14 at 09:57
  • Qt Work fine in my project, and qt headers path works. The problem is QVTKWidget that is a 3dparty library of point cloud, maybe this class refer to an older version of qt? – user2543127 Apr 07 '14 at 09:59
  • This would be possible. In Qt4 the path QtGui/QWidget does exist. If the problem resides in the different version you can try to change it to Qt5 ```#include ``` (which may break on compile or runtime) or try supplying the basic includes and libraries from Qt4 (while this may result in bogus call-traps with having different Qt-Versions). – Sebastian Lange Apr 07 '14 at 11:14
  • I try to changed qtgui/qwidget in qwidget, now i have a series of unresolved external symbol like: error LNK2019: unresolved external symbol "public: __thiscall QVTKWidget::QVTKWidget(class QWidget *,class QFlags)" (??0QVTKWidget@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z) referenced in function "public: __thiscall ExampleViewer::ExampleViewer(void)" (??0ExampleViewer@@QAE@XZ) – user2543127 Apr 07 '14 at 14:07
  • As far as I can see, you are using QT 5.2. PCL does support QT 4.8.0 only. Take a look at the dependency table here: http://pointclouds.org/downloads/windows.html – MichaelXanadu Apr 07 '14 at 15:52

1 Answers1

0

I know it is a long time now but I had the same error on Qt 5.13. I solved my problems by adding widgets in the pro file :

QT += widgets gui core

and by replaging the include files:

replace

#include <QtGui/QWidget>

with

#include <QWidget>

and eventually

#include <QtGui/QApplication>

with

#include <QApplication>

And it compiles succesfully

Pat. ANDRIA
  • 2,330
  • 1
  • 13
  • 27