c++ - 如何在 QwtPlot3D 中显示图例?

标签 c++ qt opengl legend

我现在正在使用 QwtPlot3D,我需要显示一个图例,即像这样的东西:

enter image description here

但是我不知道怎么做,而且我在网上找不到合适的教程或例子。谁能帮帮我?

最佳答案

http://qwtplot3d.sourceforge.net/web/doxygen/classQwt3D_1_1Plot3D-members.html

在 Plot3D 的所有成员列表中,它列出了:

void showColorLegend( bool 显示)

如果这行不通,您可能需要创建一个 ColorLegend 实例,并确保它具有您希望它显示的元素。

http://qwtplot3d.sourceforge.net/web/doxygen/classQwt3D_1_1ColorLegend.html

希望对您有所帮助。

关于c++ - 如何在 QwtPlot3D 中显示图例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15064706/

相关文章:

c++ - 从 Derived<X> 到 Base<X> 的 reinterpret_cast 安全吗?

c++ - 试图理解 extern 关键字

opengl - OpenGL 中的广告牌效果

c++ - std::function 是否允许在其返回类型中从引用到拷贝进行隐式转换?

c++ - 使用 * 在 C++ 中显示为密码字符

c++ - Qt C++ 中对库方法的 undefined reference

c++ - 如何使用 visual studio 2008 从 qt .ui 生成 .h 文件?

qt - 完整和完整地卸载QT Creator

c++ - mingw32 w64 缺少 OpenGL32 库

Qt & OpenGL : how to render as frequent as possible?