• 3567阅读
  • 4回复

[提问]QtChart开启openGL以后series部分属性失效 [复制链接]

上一主题 下一主题
离线martzki
 

只看楼主 倒序阅读 楼主  发表于: 2019-04-11
如点样式、pointsLabelVisible等
且显式设置也没用
QT版本为5.12.0 MSVC 2017 64bit
如下散点图,图标为圆形的是没开openGL,为方块的是开启openGL以后的效果


离线liudianwu

只看该作者 1楼 发表于: 2019-04-11
是你啊,
欢迎关注微信公众号:Qt实战/Qt入门和进阶(各种开源作品、经验整理、项目实战技巧,专注Qt/C++软件开发,视频监控、物联网、工业控制、嵌入式软件、国产化系统应用软件开发) QQ:517216493  WX:feiyangqingyun  QQ群:751439350
离线martzki

只看该作者 2楼 发表于: 2019-04-12
回 liudianwu 的帖子
liudianwu:是你啊,[表情] [表情] [表情]  (2019-04-11 19:58) 

是噢
离线martzki

只看该作者 3楼 发表于: 2019-04-13
如点样式、pointsLabelVisible等
且显式设置也没用
QT版本为5.12.0 MSVC 2017 64bit
如下散点图,图标为圆形的是没开openGL,为方块的是开启openGL以后的效果
[attachment=20128][attachment=20129]

查看了QtChart的源码,各种系列都继承自QAbstractSeries,其中包含了setUseOpenGL等方法,注释中有关于openGL功能的说明,大意为开启openGL为的是快速高效绘制大量数据点,因此它不支持许多原有的功能。
  1. The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:
  2. Series animations are not supported for accelerated series.
  3. Point labels are not supported for accelerated series.
  4. Pen styles and marker shapes are ignored for accelerated series.
  5. Only solid lines and plain scatter dots are supported.
  6. The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.
  7. Polar charts do not support accelerated series.
  8. Enabling chart drop shadow or using transparent chart background color is not recommended when using accelerated series, as that can slow the frame rate down significantly.


离线joorey

只看该作者 4楼 发表于: 2019-05-17
感谢楼主的分享 这个暂时没有接触过 官方的文件中如果出现了不确定性那么就没没什么纠结的呢 要不自己写个接口来实现一下属性失效的问题
快速回复
限100 字节
 
上一个 下一个