Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapview.h:32:29: fatal error: QtWidgets/QWidget: No such file or directory #43

Closed
foulowl opened this issue Aug 24, 2014 · 3 comments
Closed

Comments

@foulowl
Copy link

foulowl commented Aug 24, 2014

Trying to build I get:

In file included from mapview.cpp:29:0:
mapview.h:32:29: fatal error: QtWidgets/QWidget: No such file or directory
 #include <QtWidgets/QWidget>

But looks like I have that file:

locate QtWidgets/QWidget
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidgetAction
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidgetData
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidgetItem
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidgetItemV2

This is both with the source tarball and git rev 851bbbc.

Thanks!

@EtlamGit
Copy link
Collaborator

Did you succeed in building any Qt example project?
I don't compile for Linux, but it seems to be a Qt setup problem. So you should provide the path to your Qt installation in some way. This is mostly done via an environment variable:
set QTDIR=/usr/include/x86_64-linux-gnu/qt5/

@michalsrb
Copy link

I've got the same error. The problem was that I was using qmake for Qt4 which doesn't set up Qt5 include paths. With qmake for Qt5 (command qmake-qt5 in OpenSUSE) it works. Hope it helps anybody with similar issue.

@mrkite
Copy link
Owner

mrkite commented Jun 15, 2016

Just to note that you can also do qmake -qt=qt5 to force qmake to use the qt5 version for those people with multiple Qt installs.

@mrkite mrkite closed this as completed Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants