Qt:"Q3DScatter"即使包含在内也无法识别
Qt: 'Q3DScatter' not recognized even though it is included
我想在我的主窗口中显示一个3DScatter图。
在我的mainwindow.h中,我包含了#include <Q3DScatter>
但是当在 MainWindow 类的公共3DScatter scatterGraph;
:部分时,我收到以下错误消息:
error: unknown type name 'Q3DScatter'
这是我已经检查过的内容:
在Qt- 维护工具中,已经安装了"Qt数据可视化"模块
- 没有错误
#include <Q3DScatter>
- 当转到工具->找到并输入"Q3DScatter"时,它会找到
Q3DScatter
和q3dscatter.h
q3dscatter.h
存在名为Q3DScatterPrivate
和Q3DScatter
的类- 在
.pro
文件中,第一行是QT += core gui datavisualization
我做错了什么?该模块似乎存在,但为什么我无法创建Q3DScatter scatterGraph
?
编辑: 这是来自编译输出的完整错误消息:
In file included from ../MandelbulbUI/main.cpp:1:0:
../MandelbulbUI/mainwindow.h:26:5: error: ‘Q3DScatter’ does not name a type; did you mean ‘QDate’?
Q3DScatter scatterGraph;
^~~~~~~~~~
QDate
In file included from ../MandelbulbUI/mainwindow.cpp:1:0:
../MandelbulbUI/mainwindow.h:26:5: error: ‘Q3DScatter’ does not name a type; did you mean ‘QDate’?
Q3DScatter scatterGraph;
^~~~~~~~~~
QDate
In file included from moc_mainwindow.cpp:9:0:
../MandelbulbUI/mainwindow.h:26:5: error: ‘Q3DScatter’ does not name a type; did you mean ‘QDate’?
Q3DScatter scatterGraph;
^~~~~~~~~~
QDate
Makefile:1598: recipe for target 'main.o' failed
make: *** [main.o] Error 1
make: *** Waiting for unfinished jobs....
Makefile:1817: recipe for target 'moc_mainwindow.o' failed
make: *** [moc_mainwindow.o] Error 1
Makefile:1805: recipe for target 'mainwindow.o' failed
make: *** [mainwindow.o] Error 1
17:30:54: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project MandelbulbUI (kit: Desktop Qt 5.12.7 GCC 64bit)
When executing step "Make"
快速浏览标头表明Q3DScatter
是在命名空间QtDataVisualization
下声明的。 在这种情况下,您需要使用...
QtDataVisualization::Q3DScatter scatterGraph;
相关文章:
- Qt:"Q3DScatter"即使包含在内也无法识别
- 结构本身就包含在内.如何理解这一点?
- 如何识别字符串只包含数字
- 如何将枚举类作为类模板参数包含在内?
- Visual Studio 停止识别任何包含文件
- VS代码无法识别包含路径
- 将文件作为字符串包含在内
- 什么是"pch.h",为什么需要将其作为第一个头文件包含在内?
- 如何识别C中字符串中包含的数字类型
- 强制使用前向声明,即使类的标头已包含在内
- openssl包含Visual studio 2012无法识别的路径
- g++ 找不到此方法,即使它包含在内
- 如果我在Visual Studio项目中将图像作为资源包含在内,这些图像是否会编译到可执行文件中
- 识别 C 文件和包含的头文件之间依赖关系的工具/方法
- 快速识别C++的必要包含物
- C++.子项继承自“父项”,并作为“父级”属性包含在内
- 其他类无法识别包含C++的类
- 结构错误:即使包含在内,也无法识别
- Eclipse CDT - 编辑器无法识别静态库中包含的函数
- c++: code::块不能识别包含的头文件