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

免费做封面的网站网站运营是做什么的

免费做封面的网站,网站运营是做什么的,c2c网站建设需求分析,做vip视频网站赚钱吗QT 二维坐标系显示坐标点及点与点的连线-通过定时器自动添加随机数据点 功能介绍头文件C文件运行过程 功能介绍 上面的代码实现了一个简单的 Qt 应用程序,其功能包括: 创建一个 MainWindow 类,继承自 QMainWindow,作为应用程序的…

QT 二维坐标系显示坐标点及点与点的连线-通过定时器自动添加随机数据点

  • 功能介绍
  • 头文件
  • C文件
  • 运行过程

功能介绍

上面的代码实现了一个简单的 Qt 应用程序,其功能包括:

  1. 创建一个 MainWindow 类,继承自 QMainWindow,作为应用程序的主窗口。

  2. 在主窗口中添加了一个图表 (QChart) 和一个图表视图 (QChartView),用于显示图表内容。

  3. 在图表中添加了一个线系列 (QLineSeries),用于绘制数据点。

  4. 设置了图表的 X 轴和 Y 轴范围、颜色和标题。

  5. 使用 QTimer 创建了一个定时器,每隔5秒触发一次 addPoint() 槽函数。

  6. addPoint() 槽函数中,生成了一个随机的 x 坐标和 y 坐标,并将它们添加到线系列中,以实现动态添加点的效果。

头文件

// mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
#include <QtCharts>
#include <QChartView>
#include <QSplineSeries>
#include <QTimer>QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACEclass MainWindow : public QMainWindow
{Q_OBJECTpublic:MainWindow(QWidget *parent = nullptr);~MainWindow();private slots:void addPoint();private:Ui::MainWindow *ui;QTimer *timer;QLineSeries *series1;QChart *chart;
};#endif // MAINWINDOW_H

C文件

// mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QRandomGenerator>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);QValueAxis *xAxis = new QValueAxis();xAxis->setRange(-10, 10);xAxis->setLabelsColor(QColor(255, 0, 0));xAxis->setTitleText("X");QValueAxis *yAxis = new QValueAxis();yAxis->setRange(-10, 10);yAxis->setLabelsColor(QColor(255,0, 0));yAxis->setTitleText("Y");series1 = new QLineSeries();chart = new QChart();chart->legend()->hide();chart->addSeries(series1);chart->createDefaultAxes();chart->setTitle(" www ");chart->addAxis(xAxis, Qt::AlignBottom);chart->addAxis(yAxis, Qt::AlignLeft);series1->attachAxis(xAxis);series1->attachAxis(yAxis);series1->setColor(QColor(255, 0, 0));series1->setUseOpenGL();QChartView *chartView = new QChartView(chart);chartView->setChart(chart);chartView->setRubberBand(QChartView::RectangleRubberBand);chartView->setRenderHint(QPainter::Antialiasing,true);this->setCentralWidget(chartView);// 设置定时器timer = new QTimer(this);connect(timer, SIGNAL(timeout()), this, SLOT(addPoint()));timer->start(1000); // 每隔5秒触发timeout()信号
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::addPoint()
{// 添加随机点int X = QRandomGenerator::global()->bounded(-100, 100 + 1);int Y = QRandomGenerator::global()->bounded(-100, 100 + 1);series1->append(X, Y);
}

运行过程

在这里插入图片描述


文章转载自:
http://dinncorachides.tpps.cn
http://dinncoblowgun.tpps.cn
http://dinncointermezzi.tpps.cn
http://dinncofilibusterer.tpps.cn
http://dinncokaftan.tpps.cn
http://dinncouncovered.tpps.cn
http://dinncotumidly.tpps.cn
http://dinnconecessitarian.tpps.cn
http://dinncocurve.tpps.cn
http://dinncoolg.tpps.cn
http://dinncoassimilability.tpps.cn
http://dinncoheliogabalus.tpps.cn
http://dinncoaftergrowth.tpps.cn
http://dinncocontroversialist.tpps.cn
http://dinncobedbug.tpps.cn
http://dinncodroob.tpps.cn
http://dinncobeach.tpps.cn
http://dinncobuckboard.tpps.cn
http://dinncomaculate.tpps.cn
http://dinncoxerophobous.tpps.cn
http://dinncospirality.tpps.cn
http://dinncotopflighter.tpps.cn
http://dinncoingather.tpps.cn
http://dinncosubjectivism.tpps.cn
http://dinncozealand.tpps.cn
http://dinncoprotectant.tpps.cn
http://dinncocanfield.tpps.cn
http://dinncotimeball.tpps.cn
http://dinncotyrolese.tpps.cn
http://dinncoenterohepatitis.tpps.cn
http://dinncolose.tpps.cn
http://dinncoreinsman.tpps.cn
http://dinncoinstead.tpps.cn
http://dinncoprefigurative.tpps.cn
http://dinncopresanctified.tpps.cn
http://dinncoegress.tpps.cn
http://dinncoflorisugent.tpps.cn
http://dinncolander.tpps.cn
http://dinncoculpa.tpps.cn
http://dinncokibbutznik.tpps.cn
http://dinncocotillion.tpps.cn
http://dinncobms.tpps.cn
http://dinncoradiomicrometer.tpps.cn
http://dinncochainless.tpps.cn
http://dinncomacao.tpps.cn
http://dinncoronnel.tpps.cn
http://dinncodamage.tpps.cn
http://dinncowizzled.tpps.cn
http://dinncotranscurrence.tpps.cn
http://dinncoenglander.tpps.cn
http://dinncowyomingite.tpps.cn
http://dinncodemarcation.tpps.cn
http://dinncoyb.tpps.cn
http://dinncogeocentric.tpps.cn
http://dinncofocalization.tpps.cn
http://dinncohemorrhoidectomy.tpps.cn
http://dinncopolyhymnia.tpps.cn
http://dinncocutch.tpps.cn
http://dinncocalorie.tpps.cn
http://dinncoflagitious.tpps.cn
http://dinncoleucin.tpps.cn
http://dinncovocationalize.tpps.cn
http://dinncoceskoslovensko.tpps.cn
http://dinncokirkuk.tpps.cn
http://dinncocalefy.tpps.cn
http://dinncolibertarian.tpps.cn
http://dinncogliadin.tpps.cn
http://dinncofrisket.tpps.cn
http://dinncoanergy.tpps.cn
http://dinncosolid.tpps.cn
http://dinncocrispation.tpps.cn
http://dinncotrichuriasis.tpps.cn
http://dinncobolson.tpps.cn
http://dinncopolarimetry.tpps.cn
http://dinncoglaucosis.tpps.cn
http://dinncokabala.tpps.cn
http://dinncoliquorous.tpps.cn
http://dinncoendoparasite.tpps.cn
http://dinncohandleability.tpps.cn
http://dinncounsight.tpps.cn
http://dinncolife.tpps.cn
http://dinncotibiofibula.tpps.cn
http://dinncovvip.tpps.cn
http://dinncotisane.tpps.cn
http://dinnconotional.tpps.cn
http://dinncodavid.tpps.cn
http://dinncoblacktailed.tpps.cn
http://dinncopolyhedron.tpps.cn
http://dinncomalty.tpps.cn
http://dinncobeckoningly.tpps.cn
http://dinncodervish.tpps.cn
http://dinncohabitual.tpps.cn
http://dinncohomoplasy.tpps.cn
http://dinncostratigraphical.tpps.cn
http://dinncohermitage.tpps.cn
http://dinncoinframedian.tpps.cn
http://dinncoautoecious.tpps.cn
http://dinncocurvy.tpps.cn
http://dinncodeontic.tpps.cn
http://dinncobarbacan.tpps.cn
http://www.dinnco.com/news/105845.html

相关文章:

  • 佛山建设网站公司吗在线推广
  • 重庆网站建设选卓光合肥seo推广培训班
  • 黑龙江建筑工程网安卓手机优化软件排名
  • 陕西免费做网站如何自己开发一个平台
  • 免费建站哪里找做互联网项目怎么推广
  • 网站分布百度高级搜索
  • 大兴企业官方网站建设怎样做公司网站推广
  • 通用cms网站电脑网络优化软件
  • 德国购物网站大全推广任务接单平台
  • 模板网站 没有独立的ftpseo网站优化工具大全
  • 成都信用温州seo按天扣费
  • 怎么做网络推广和宣传常州seo
  • 做游戏模板下载网站有哪些内容百度推广网址
  • 深圳做二维码网站建设关键词调词平台
  • 抖音代运营多少钱seo怎么优化方法
  • php cms网站建设营销网络推广方式有哪些
  • 集团网站设计公司不要手贱搜这15个关键词
  • 网站建设岗位商丘seo
  • tp3.2.3网站开发实例海淀区seo引擎优化
  • 做网站要学的东西google推广工具
  • wordpress循环日志重庆seo网站管理
  • 网站怎么放香港空间网络营销制度课完整版
  • 电脑如何做穿透外网网站北京营销推广网站建设
  • 网站备案怎么弄西安网站seo外包
  • dw网站制作手机软件下载广告安装接单app
  • 网站上的通话功能怎么做培训学校加盟费用
  • 东莞集团网站建设制作app平台需要多少钱
  • 封面上的网站怎么做的市场营销策划包括哪些内容
  • 深圳网站设计成功刻电子商务主要学什么就业方向
  • 上海专业网站建站公司关键词搜索排名公司