我正在尝试安装CTK,但每次尝试都会得到以下错误:
[ 41%] Built target CTKWidgetsPlugins
Scanning dependencies of target CTKWidgetsCppTests
[ 41%] Building CXX object Libs/Widgets/Testing/Cpp/CMakeFiles/CTKWidgetsCppTests.dir/ctkSearchBoxTest1.cpp.o
/home/pedrojunior/Desktop/CTK/Libs/Widgets/Testing/Cpp/ctkSearchBoxTest1.cpp: In function ‘int ctkSearchBoxTest1(int, char**)’:
/home/pedrojunior/Desktop/CTK/Libs/Widgets/Testing/Cpp/ctkSearchBoxTest1.cpp:43:24: error: ‘QPalette::ColorRole’ is not a class or namespace
p.setColor(QPalette::ColorRole::Window, Qt::gray);
^
/home/pedrojunior/Desktop/CTK/Libs/Widgets/Testing/Cpp/ctkSearchBoxTest1.cpp:44:24: error: ‘QPalette::ColorRole’ is not a class or namespace
p.setColor(QPalette::ColorRole::Base, Qt::gray);
^
make[5]: *** [Libs/Widgets/Testing/Cpp/CMakeFiles/CTKWidgetsCppTests.dir/ctkSearchBoxTest1.cpp.o] Error 1
make[4]: *** [Libs/Widgets/Testing/Cpp/CMakeFiles/CTKWidgetsCppTests.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [CTK-prefix/src/CTK-stamp/CTK-build] Error 2
make[1]: *** [CMakeFiles/CTK.dir/all] Error 2
make: *** [all] Error 2我使用LinuxMint17.1,并安装了cmake版本2.8.12.2和Qt版本4.8。有人知道我怎么纠正这个错误吗?
发布于 2015-05-23 07:01:21
QPalette::ColorRole不是C++11枚举类,它只是一个普通枚举。因此,不应该声明ColorRole部分。
https://stackoverflow.com/questions/30404652
复制相似问题