C++ QtTest/QtTest:没有这样的文件或目录

C++ QtTest/QtTest:没有这样的文件或目录,c++,linux,qt,ubuntu,C++,Linux,Qt,Ubuntu,我尝试从Qt示例(../Qt/Examples/Qt-5.14.2/qtestlib/tutorial1/)执行Qt单元测试应用程序 我有: 我得到: g++-c-m64-pipe-O2-Wall-W-D_可重入式-DQT_-NO-DEBUG-DQT_-TESTLIB-DQT_-GUI-LIB-DQT_-CORE-LIB-I/usr/share/qt4/mkspecs/linux-g++-64-I-I/usr/include/qt4/QtCore-I/usr/include/qt4/QtGui-

我尝试从Qt示例(
../Qt/Examples/Qt-5.14.2/qtestlib/tutorial1/
)执行Qt单元测试应用程序

我有:

我得到:

g++-c-m64-pipe-O2-Wall-W-D_可重入式-DQT_-NO-DEBUG-DQT_-TESTLIB-DQT_-GUI-LIB-DQT_-CORE-LIB-I/usr/share/qt4/mkspecs/linux-g++-64-I-I/usr/include/qt4/QtCore-I/usr/include/qt4/QtGui-I/usr/include/qt4/QtTest-I/qtstring.qst-qstring.qsp>

testqstring.cpp:52:10: fatal error: QtTest/QtTest: No such file or directory
#include <QtTest/QtTest>
          ^~~~~~~~~~~~~~~
compilation terminated.
Makefile:205: recipe for target 'testqstring.o' failed
make: *** [testqstring.o] Error 1
testqstring.cpp:52:10:致命错误:qtest/qtest:没有这样的文件或目录
#包括
^~~~~~~~~~~~~~~
编译终止。
Makefile:205:目标“testqstring.o”的配方失败
make:**[testqstring.o]错误1

怎么了?我使用xubuntu 18.04

尝试使用以下命令从Qt安装文件夹调用qmake:

<QT-PATH>/Qt/Qt-5.14.2/gcc_64/bin/qmake
/Qt/Qt-5.14.2/gcc_64/bin/qmake

这三个命令有效吗
qmake-项目“QT+=testlib”
qmake
make
@ankii否,有相同的output@ankii我注意到,在<代码> > /Ur/Is//< /Cord>中,没有文件夹<代码> QT4<代码>,我已经通过BREW(MaCOS)安装了QT,并且它还在(我仍然必须检查如何在C++文件中包含它)。
/usr/local/cillar/qt/5.14.1/lib/qtest.framework/Versions/5/Headers/qtest
如果所有操作都失败,您可以尝试此操作,回退到特定于您的计算机的硬编码完整路径。实际上它是符号链接的,并且应将
/usr/local/cillar/qt/5.14.1/include/qtest
添加到include路径,然后将头作为
包含。
<QT-PATH>/Qt/Qt-5.14.2/gcc_64/bin/qmake