QAction:没有这样的文件或目录
我收到错误
QAction:没有这类档案或目录
QAction: No such file or directory
当我尝试编译插件项目(C ++库模板)。奇怪,因为我有一个项目,我的应用程序,也包括这个标题,没有错误。
when I try to compile a project for plugin (C++ Library template). Weird, because I have a project for my app which also includes this header and there is no error. What might cause this?
确保您设置了正确的包含路径。
Make sure that you have the right include paths set up.
如果你使用QMake, *。pro
应该包含这些设置,如果你想包括 QtGui
。它们应该默认设置,但有些模板可能无法设置它们。
If you use QMake the *.pro
should contain these settings if you want to include files from QtGui
. They should be set by default but some templates may not set them.
CONFIG += qt
QT += gui
如果您使用另一个构建系统,请确保您使用
If you use another build system then make sure that you either use
#include <QtGui/QAction>
或您添加 $ QTDIR / include / QtGui
而不只是 $ QTDIR / include
到您的包含路径
or you add $QTDIR/include/QtGui
and not just $QTDIR/include
to your include path