中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

愛(ài)做奈官方網(wǎng)站優(yōu)化公司哪家好

愛(ài)做奈官方網(wǎng)站,優(yōu)化公司哪家好,甘肅網(wǎng)站建設(shè)選哪家,免費(fèi)下載ppt的網(wǎng)站兩個(gè)核心類時(shí)QChart和QLineSeries 下面這個(gè)示例代碼中&#xff0c;定時(shí)器每隔一段時(shí)間將曲線圖中的數(shù)據(jù)點(diǎn)向右移動(dòng) 一個(gè)單位&#xff0c;同時(shí)調(diào)整橫坐標(biāo)軸的范圍&#xff0c;實(shí)現(xiàn)了一次滾動(dòng)對(duì)應(yīng)移動(dòng)一個(gè)數(shù)據(jù)點(diǎn)的效果。 QLineSeries最多容納40961024個(gè)點(diǎn) #include <QtWidg…

兩個(gè)核心類時(shí)QChart和QLineSeries

下面這個(gè)示例代碼中,定時(shí)器每隔一段時(shí)間將曲線圖中的數(shù)據(jù)點(diǎn)向右移動(dòng) 一個(gè)單位,同時(shí)調(diào)整橫坐標(biāo)軸的范圍,實(shí)現(xiàn)了一次滾動(dòng)對(duì)應(yīng)移動(dòng)一個(gè)數(shù)據(jù)點(diǎn)的效果。

QLineSeries最多容納4096+1024個(gè)點(diǎn)

#include <QtWidgets/QApplication>
#include <QtWidgets/QMainWindow>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QtCharts/QValueAxis>
#include <QtCore/QRandomGenerator>
#include <QtCore/QTimer>
#include <QDebug>QT_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_cast<QValueAxis *>(chart->axes(Qt::Horizontal).at(0));QValueAxis *axisY = qobject_cast<QValueAxis *>(chart->axes(Qt::Vertical).at(0));axisY->setRange(0, 120);// 初始化數(shù)據(jù)點(diǎn)qreal startX = 0;for (int i = 0; i < 100; ++i) {series->append(startX + i, QRandomGenerator::global()->bounded(100));}int currentIndex = 0; // 當(dāng)前數(shù)據(jù)點(diǎn)索引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;// 移動(dòng)數(shù)據(jù)點(diǎn)//series->remove(0);series->append(series->points().last().x() + 1, QRandomGenerator::global()->bounded(100));// 計(jì)算滾動(dòng)后的橫坐標(biāo)范圍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 += c++11# 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_BEFORE=0x060000    # 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.risenshineclean.com/news/27026.html

相關(guān)文章:

  • 怎樣做百度網(wǎng)站推廣百度6大核心部門(mén)
  • visual studio做網(wǎng)站哪個(gè)公司做網(wǎng)站推廣最好
  • 網(wǎng)站關(guān)鍵詞可以添加嗎seo關(guān)鍵詞外包
  • 獵頭公司應(yīng)堅(jiān)持的原則有超級(jí)優(yōu)化空間
  • 東莞建站seo怎么收費(fèi)的
  • 網(wǎng)站中flash怎么做的游戲推廣怎么做引流
  • 做網(wǎng)站什么商品好軟文網(wǎng)站模板
  • 河田鎮(zhèn)建設(shè)局網(wǎng)站百度知道app
  • 建設(shè)部網(wǎng)站四庫(kù)一平臺(tái)best網(wǎng)絡(luò)推廣平臺(tái)
  • 在公司做網(wǎng)站是什么職位網(wǎng)頁(yè)搜索
  • 二手房在哪個(gè)網(wǎng)站做合同互聯(lián)網(wǎng)營(yíng)銷師培訓(xùn)大綱
  • 敦煌網(wǎng)站銷售員怎么做濰坊今日頭條新聞
  • pb 做網(wǎng)站網(wǎng)站排名怎么優(yōu)化
  • 橙子建站驗(yàn)證碼是詐騙嗎長(zhǎng)沙靠譜seo優(yōu)化
  • 網(wǎng)站建設(shè)方案新聞鄭州網(wǎng)絡(luò)營(yíng)銷公司
  • wordpress停用react如何做谷歌seo推廣
  • c 手機(jī)網(wǎng)站開(kāi)發(fā)模板國(guó)家衛(wèi)生健康委
  • 信息系統(tǒng)軟件有哪些優(yōu)化的概念
  • 外貿(mào)公司網(wǎng)站模板免費(fèi)阿里云搜索引擎網(wǎng)址
  • 做網(wǎng)站用的圖標(biāo)必應(yīng)搜索引擎入口官網(wǎng)
  • 成都專業(yè)做游戲網(wǎng)站個(gè)人網(wǎng)頁(yè)在線制作
  • 濱州 網(wǎng)站建設(shè)互聯(lián)網(wǎng)運(yùn)營(yíng)培訓(xùn)課程
  • 湖南人工智能建站系統(tǒng)軟件搜索引擎排名查詢
  • 站長(zhǎng)平臺(tái)驗(yàn)證網(wǎng)站什么建站程序最利于seo
  • 個(gè)人怎么做網(wǎng)站優(yōu)化百度愛(ài)采購(gòu)怎樣入駐
  • 做家教一般在哪個(gè)網(wǎng)站企業(yè)網(wǎng)站制作費(fèi)用
  • 網(wǎng)站開(kāi)發(fā) 渠道百度seo排名優(yōu)化助手
  • 萊蕪區(qū)組織部網(wǎng)站淘寶指數(shù)入口
  • 網(wǎng)站設(shè)計(jì)與網(wǎng)頁(yè)制作項(xiàng)目教程天津優(yōu)化代理
  • 大嶺山仿做網(wǎng)站seo推廣 課程