qcustomplot库对replot()的解释:


void QCustomPlot::replot
(
QCustomPlot::RefreshPriority
refreshPriority = QCustomPlot::rpRefreshHint
)Causes a complete replot into the internal paint buffer(s).
Finally, the widget surface is refreshed with the new buffer contents. This is the method that must be called to make changes to the plot, e.g. on the axis ranges or data points of graphs, visible.
The parameter refreshPriority can be used to fine-tune the timing of the replot.For example if your application calls replot very quickly in succession
(e.g. multiple independent functions change some aspects of the plot and each wants to make sure the change gets replotted),it is advisable to set refreshPriority to QCustomPlot::rpQueuedReplot. This way, the actual replotting is deferred to the next event loop iteration.
Multiple successive calls of replot with this priority will only cause a single replot, avoiding redundant replots and improving performance.
Under a few circumstances, QCustomPlot causes a replot by itself.
Those are resize events of the QCustomPlot widget and user interactions (object selection and range dragging/zooming).
Before the replot happens, the signal beforeReplot is emitted. After the replot, afterReplot is emitted.
It is safe to mutually connect the replot slot with any of those two signals on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion.
If a layer is in mode QCPLayer::lmBuffered (QCPLayer::setMode), it is also possible to replot only that specific layer via QCPLayer::replot. See the documentation there for details. 

其中:

The parameter refreshPriority can be used to fine-tune the timing of the replot. For example if your application calls replot very quickly in succession (e.g. multiple independent functions change some aspects of the plot and each wants to make sure the change gets replotted), it is advisable to set refreshPriority to QCustomPlot::rpQueuedReplot. This way, the actual replotting is deferred to the next event loop iteration. Multiple successive calls of replot with this priority will only cause a single replot, avoiding redundant replots and improving performance.

意思是

通过调用QCustomPlot::rpQueuedReplot.可以避免重复的replot和提高性能!

所以当我使用线程进行刷新图表的时候我使用

ui->customplot->replot(QCustomPlot::rpQueuedReplot);

而不是使用ui->customplot->replot();

QCustomPlot 连续快速地调用replot()改善速度相关推荐

  1. 推荐一个快速反射调用的类

    使用传统的.net反射机制,调用类的方法时,在调用频率大的情况下,会感觉速度很慢.最近浏览卢彦的博客时,找到一个他改进后的反射调用类.试用以后感觉效率明显提高,特推荐给大家.作者重新实现了,反射调用方 ...

  2. Android Toast连续快速切换更新内容无延迟

    在Android开发中,我们经常会使用到Toast,我们最常用的方式是: public static void showToast(Context context, String message) { ...

  3. 小米3连续快速点击android版本四次后出现屏幕是红的咋耨,小米3怎么打开usb调试...

    小米3怎么打开usb调试 安卓手机要连接电脑,就必须开启USB调试模式,而通常手机默认是关闭USB调试模式的,这导致了不少用户无法成功将手机连接电脑,另外一些搭载安卓4.1以上系统的手机,开启USB调 ...

  4. 小米3连续快速点击android版本四次后出现屏幕是红的咋耨,小米3手机连不上电脑怎么办?...

    谈到小米手机,我想说一个字"黑":谈到抢小米手机,我想说一个字"坑":在两次抢购小米2s无果之后,终于在前几天在小米达人无飘嘟嘟大神的帮助下,买到了传说中的&q ...

  5. 关于递归连续两次调用的小结

    关于递归连续两次调用的小结 递归定义 递归简单的来说可以理解为函数自己直接调用自己,或者间接调用. 递归调用的时候.要找到递归的规律和结束的条件出口. 通常递归一次调用比较好理解.但是一般超过一次后, ...

  6. python调用opencv的速度_OpenCV-Python系列之OpenCV性能衡量与优化方法

    本次教程我们谈及OpenCV的性能衡量与优化,众所周知,算法的不断的革新其最重要的一点就是不断的优化再优化,比如我们的后面要讲到的边缘检测的算法,又或者是图像分割的算法,他们都是随着时间的一步一步的推 ...

  7. superslide 多次点击调用slide()和速度问题

    在开发过程中遇到很多大坑,比如css3中transition: 0s;会导致superslide调用参数interTime效果不起作用 <div id="slide" cla ...

  8. C语言中连续两个printf,在C中两个连续的printf()调用的奇怪行为

    Basile Stary.. 7 你有一些未定义的行为(所以可能发生任意不好的事情,你不应该期待任何好事).随着对的printf函数期望(注意,当作为参数传递一个被晋升为一个),但是是文字型的.此外, ...

  9. 京东智臻链开放联盟网络的快速部署调用

    前言: 最近要用区块链用于存证,然后看到京东智臻链开放联盟网络,就了解了一下,然后决定自己写代码来调用它来用于存证,免费还是挺香的. 建议在阅读本文时先了解一下京东智臻链开放联盟网络. 完成注册,登陆 ...

最新文章

  1. Curator selector
  2. Cloudera Manager集群官方默认的各个组件开启默认顺序(图文详解)
  3. 克服35岁焦虑|算法er的尽头会是To B吗?
  4. boost::geometry::sym_difference用法的测试程序
  5. 如何突破科研瓶颈?如何与导师自在相处?微软研究员们的读博心得
  6. 【转载】Apache Ranger剖析:Hadoop生态圈的安全管家
  7. 第二届大数据世界论坛 聚焦行业需求
  8. Linux中telnet命令
  9. 基于GPON的光纤光栅通信网与传感网融合技术研究
  10. Linux CentOS 7安装Oracle11g超完美教程
  11. 66天全部就业,最高薪资25000元!黑马Java学科真牛
  12. android tf卡 修复工具,sd卡修复工具大师
  13. typecho插件编写教程7 - Helper类
  14. 如何让PDF转换成Excel
  15. oracle连续月份列表,Oracle实现查询2个日期所跨过的月份列表/日期列表的方法分析...
  16. C语言——计算数组长度
  17. 学数据结构堆襸_gbk编码 - osc_6pogm9r5的个人空间 - OSCHINA - 中文开源技术交流社区...
  18. android packagemanagerservice目录,Android重学系列 PackageManagerService的启动与安装(下)
  19. Java中的 if条件语句
  20. Flutter开发(二十九):Flutter热重启、热加载、调试与发布应用

热门文章

  1. windows 1903用linux使用,Win10 build 1903中的WSL Update允许您从Windows访问Linux文件
  2. 区块链入门教程(8)--WeBASE-Front节点前置服务
  3. Formality总结
  4. 呆老大,奸老二,家家有个坏老三(转载自:http://soulogic.3322.org/blog/read.php/165.html)
  5. 在TITAN RTX 2080Ti 上安装 Ubuntu18.04+Nvidia-430显卡驱动+配置深度学习环境(1)
  6. 为何我们要离职?---一个程序猿的社会学感悟
  7. 经纬恒润荣获海克斯康“最佳业绩奖”
  8. 计算机二级offic表格公式,计算机二级OfficeEexcel公式汇总.docx
  9. git reset 怎么还原_git 本地修改被reset后怎么恢复
  10. 海定计算机计算标准差,标准差怎么算公式(标准差的计算例题)