当前位置: 首页 > news >正文

那个网站教做冰鲜鱼摄影网站模板html

那个网站教做冰鲜鱼,摄影网站模板html,wordpress 论坛编辑器,电子产品展示网站两个核心类时QChart和QLineSeries 下面这个示例代码中#xff0c;定时器每隔一段时间将曲线图中的数据点向右移动 一个单位#xff0c;同时调整横坐标轴的范围#xff0c;实现了一次滚动对应移动一个数据点的效果。 QLineSeries最多容纳40961024个点 #include QtWidg…两个核心类时QChart和QLineSeries 下面这个示例代码中定时器每隔一段时间将曲线图中的数据点向右移动 一个单位同时调整横坐标轴的范围实现了一次滚动对应移动一个数据点的效果。 QLineSeries最多容纳40961024个点 #include QtWidgets/QApplication #include QtWidgets/QMainWindow #include QtCharts/QChartView #include QtCharts/QLineSeries #include QtCharts/QValueAxis #include QtCore/QRandomGenerator #include QtCore/QTimer #include QDebugQT_CHARTS_USE_NAMESPACEint main(int argc, char *argv[]) {QApplication a(argc, argv);QMainWindow window;QChartView *chartView new QChartView(window);window.setCentralWidget(chartView);QChart *chart new QChart();chart-legend()-hide();chartView-setChart(chart);chart-createDefaultAxes();QLineSeries *series new QLineSeries();chart-addSeries(series);chart-createDefaultAxes();QValueAxis *axisX qobject_castQValueAxis *(chart-axes(Qt::Horizontal).at(0));QValueAxis *axisY qobject_castQValueAxis *(chart-axes(Qt::Vertical).at(0));axisY-setRange(0, 120);// 初始化数据点qreal startX 0;for (int i 0; i 100; i) {series-append(startX i, QRandomGenerator::global()-bounded(100));}int currentIndex 0; // 当前数据点索引QTimer timer;timer.setInterval(100);QObject::connect(timer, QTimer::timeout, [](){if (series-points().size() 4096 1024){int n series-points().size() - 4096;series-removePoints(0, n);currentIndex- n;qDebug() remove n;}qDebug() currentIndex;// 移动数据点//series-remove(0);series-append(series-points().last().x() 1, QRandomGenerator::global()-bounded(100));// 计算滚动后的横坐标范围qreal minX series-points().at(currentIndex).x();qreal maxX series-points().last().x();qreal targetMinX minX 1;qreal targetMaxX maxX 1;axisX-setRange(targetMinX, targetMaxX);currentIndex;});timer.start();window.resize(800, 600);window.show();return a.exec(); }.pro文件 QT core gui chartsgreaterThan(QT_MAJOR_VERSION, 4): QT widgetsCONFIG c11# The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES QT_DEPRECATED_WARNINGS# You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES QT_DISABLE_DEPRECATED_BEFORE0x060000 # disables all the APIs deprecated before Qt 6.0.0SOURCES \main.cppHEADERS TRANSLATIONS \myChart_zh_CN.ts# Default rules for deployment. qnx: target.path /tmp/$${TARGET}/bin else: unix:!android: target.path /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS target
http://www.hkea.cn/news/14275359/

相关文章:

  • 网站建设策划 流程移动应用开发是学什么的
  • 十堰学校网站建设上海企业网站建设推荐
  • 做网站用ui好还是pswordpress welcome
  • 邯郸网站设计公司新的营销方式有哪些
  • 门户网站建设 考核自己做的网站如何调入dede
  • 网站开发技术发展史网站空间域名维护协议
  • 微信网站和手机网站的区别广州天河区房价
  • 网站的交互设计自己创建的网站怎么做流量
  • 广州网站建设培训班免费的黄冈网站有哪些
  • 用php做的大型网站网站标签span
  • 洛阳网站设计哪家专业什么软件推广效果好
  • 用于建设教学网站的建站工具有哪些特点做网站需要哪些人
  • 网站建设备案优化设低价刷赞网站推广
  • 博客网站建设基本流程公网主机上做的网站如果访问
  • 湛江网站制作网站东莞技术好的网站建设
  • 网站开发中网页之间的连接形式有成都自由行攻略最详细
  • 网站会员推广功能网站服务设计
  • 建一个网站首先要怎么做永久免费网站建设方案
  • 网站图片移动怎么做可以注册的网站
  • 做自己的外贸网站怎样赚钱图片点击就能跳转网站怎么做的
  • 爱站网关键字查询上海网站建设品
  • 江苏质量员证在哪个网站做的wordpress给所有用户发邮件
  • 企业免费网站设计公司外围网站代理怎么做
  • 空间站建造阶段wordpress 评论 验证
  • it网站建设方案网店推广的含义
  • 什么最便宜网站建设网站建设文化机构
  • 完美建设工程有限公司网站广告设计网站免费
  • .net做网站后台北京网站建设公司怎么排版
  • 吴中网站建设微信小程序网页制作
  • 代做机械设计的网站软件技术主修课程