当前位置:网站首页>Qcustomplot 1.0.1 learning (1) - Download and use qcustomplot
Qcustomplot 1.0.1 learning (1) - Download and use qcustomplot
2022-06-11 15:09:00 【Zhang classmate software development】
1、QCustomPlot Introduce
QCustomPlot is a Qt C++ widget for plotting and data visualization. It has no further dependencies and is well documented. This plotting library focuses on making good looking, publication quality 2D plots, graphs and charts, as well as offering high performance for realtime visualization applications. Have a look at the Setting Up and the Basic Plotting tutorials to get started.
QCustomPlot can export to various formats such as vectorized PDF files and rasterized images like PNG, JPG and BMP. QCustomPlot is the solution for displaying of realtime data inside the application as well as producing high quality plots for other media.
2、QCustomPlot The download
QCustomPlot The website links :https://www.qcustomplot.com/index.php/introduction
Download link :https://www.qcustomplot.com/index.php/download

Here I am. 1.0.1 Version to learn , So click the red box in the above figure , You can download the full installation package , Including source code , file , Help files, etc .
3、QCustomPlot Use
3.1、 Create a new one Qt Interface program

Create good after , The project structure is as follows :

3.2、 take QCustomPlot Add the source file to the project
The compressed file will be downloaded QCustomPlot.tar.gz Copy to the project directory , Then decompress .
I unzip it here to QCustomPlot Under the folder , This way the files won't be messy .
QCustomPlot The folder contains the following files :

among :
- qcustomplot.h and qcustomplot.cpp It's a source file
- documentation It's the document directory
- examples It's the case catalogue
take qcustomplot.h and qcustomplot.cpp Add to the project , The added project structure is as follows :

3.2.1、 Control lifting method
double-click mainwindow.ui Interface file , stay UI Designer in , You can drag a Widget Control to ui On the designer , Right click on this form , Select promote to :

In the promoted widget window , Enter the following information :

then , Click add in turn 、 Lift button .
After lifting , The list of form objects is as follows :

There will be centralWidget Use horizontal layout ,widget Renamed as customPlot. The list of modified form objects is as follows :

function :
3.2.2、 Direct use method
Direct use refers to the use of QCustomPlot Where the papers are , Include header files directly , Then the program shows the creation QCustomPlot Control .
Code :
QCustomPlot *customPlot=new QCustomPlot;
QHBoxLayout *mainLayout=new QHBoxLayout;
mainLayout->addWidget(customPlot);
ui->centralWidget->setLayout(mainLayout);
setWindowTitle(" Direct use method ");function :

边栏推荐
- Summary of redis basic knowledge
- System. out. What should I pay attention to when using the println () method
- PowerShell chief architect: I used my spare time to develop projects, but I was demoted by Microsoft because of my excellent performance
- Safepoint explanation and analysis of its placement ideas
- Dynamically set the layoutinflater of the layout
- MySQL用户权限总结【用户授权必会】
- 数据库“百亿蓝海”中,每位玩家都能找到一叶扁舟 | C位面对面
- Basic configuration command of Xinhua 3 switch system
- Anaconda delete virtual environment
- Mysql(九)Your password has expired. To log in you must change it using a client that supports expired
猜你喜欢
随机推荐
Did you break the rules?
数据库“百亿蓝海”中,每位玩家都能找到一叶扁舟 | C位面对面
North China pushed Yale hard, MIT won the first place in a row, and the latest 2023qs world university ranking was released
详解 Kubernetes 包管理工具 Helm
Nexus of repository manager
LeetCode每日一题——加一
Raspberry pie obtains the function of network installation system without the help of other devices
数据库优化
数据分析系统的设计与实现
2022 simulated 100 questions and simulated examination of quality officer municipal direction post skills (Quality Officer) examination
Raspberry school literacy
在微服务架构中管理技术债务
Hamad application layout scheme 03 of hashicopy (run a job)
Learn more about and use ThreadLocal
19. Insertion et suppression d'un arbre de recherche binaire
Leetcode daily question - Search insertion position
高数_第6章无穷级数__马克劳林级数
树莓派获得网络安装系统功能,无需借助其他设备
02 Tekton Pipeline
浅谈居家办公后的感想| 社区征文

![[SystemVerilog interface] ~ interface](/img/dc/0a9750cace1460af772e2f3f6a8763.png)






