qcustomplot学习笔记1-开发环境搭建
来源:互联网 发布:微信小程序 数据库 编辑:程序博客网 时间:2024/06/05 04:21
现在qt绘图大家用的比较多的还算是qwt和qcustomplot。qt官方出的qcharts,qt5.4以后才能用,嵌入式系统可能还是不怎么考虑。
以前用过qwt进行绘制,环境搭建的时间稍微麻烦一些。官方提供的库的使用教程不是源码形式使用,debug不太方便。qcustomplot加一个头文件和一个源文件就行,也可以debug方便很多。
1.代码下载
官方网站可以很方便下载:http://www.qcustomplot.com/
http://www.qcustomplot.com/index.php/download
2.把解压出来的源文件qcustomplot.cpp和qcustomplot.h拷贝到源文件目录,并把这两个文件加入.pro文件中。
添加后的.pro文件
#-------------------------------------------------## Project created by QtCreator 2017-06-21T16:36:53##-------------------------------------------------QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupportTARGET = qcp_1TEMPLATE = app# The following define makes your compiler emit warnings if you use# any feature of Qt which as been marked as 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 you use 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.cpp\ mainwindow.cpp\ qcustomplot.cppHEADERS += mainwindow.h\ qcustomplot.hFORMS += mainwindow.ui3.在ui中添加一个QWidget,然后提升为QCustomPlot类
4.然后就可以正常使用QCustomPlot进行曲线绘制了。
阅读全文
0 0
- qcustomplot学习笔记1-开发环境搭建
- Android开发学习笔记1---环境搭建
- OpenGL学习笔记(1)--开发环境搭建
- Net控件开发学习笔记(1)——搭建环境
- android学习笔记(1)-- 开发环境搭建及helloworld
- 我的嵌入式学习笔记(1)-- 搭建开发环境
- 我的嵌入式学习笔记(1)-- 搭建开发环境
- android学习笔记1--------------开发环境的搭建-xp版
- 我的嵌入式学习笔记(1)-- 搭建开发环境 .
- android学习笔记(1)---搭建开发环境
- android学习笔记(1)-android开发环境搭建
- android学习笔记(1)-ANDROID开发环境搭建
- Uniyt3D的学习笔记(1)-----Unity3D 开发环境的搭建
- Nginx学习笔记1-编译Nignx,搭建开发环境
- OpenCV学习笔记1 OpenCV软件开发环境的搭建
- Lua学习笔记1:开发环境搭建(windows和linux)
- SDL2.0学习笔记1---开发环境搭建
- C语言学习笔记(1):搭建开发环境
- SQL索引优化
- 思维导图之最基本用法
- C#中base、this关键字的几种用法
- Hibernate与Mybatis对比
- dedecms模板教程:织梦模板网站SEO优化教程
- qcustomplot学习笔记1-开发环境搭建
- 真Unity3d_亲自做了一次之后,终于发现了为什么那么多烂游戏,那么多新手引导
- lodash和underscore
- 【0023】当用户在SQL Server 2008更改表结构时,必须要先删除原来的表
- CubeSuite+ 的使用介绍
- zz: Windbg: debugging commands
- 接口回调最简单的使用方式
- 安卓桌面消息获取,角标数量显示
- Batch Normalization详解