qwt的安装和移植-
目须要依据实时数据绘制出图表,因此我们找到了qwt库。这个库是一个绘制图表,曲线图,柱状图的统计图标。
。
。。
以下我们就具体解说一下这个库在Larm上的编译和移植
qwt介绍
它为具有技术专业背景的程序提供GUI组件和一组有用类。其目标是以基于2D方式的窗口部件来显示数据。 数据源以数值,数组或一组浮点数等方式提供, 输出方式能够是Curves(曲线),Slider(滚动栏),Dials(圆盘)。Compasses(仪表盘)等等。
该工具库基于Qt开发,所以也继承了Qt的跨平台特性。
qwt下载
文档 http://cznic.dl.sourceforge.net/project/qwt/qwt/6.1.0/qwt-6.1.0.pdf
编译安装
。
################################################################
# Qwt Widget Library
# Copyright (C) 1997 Josef Wilgen
# Copyright (C) 2002 Uwe Rathmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the Qwt License, Version 1.0
################################################################
#
# 这个是qwt的版本号号
# qwt6.1.0
QWT_VER_MAJ = 6
QWT_VER_MIN = 1
QWT_VER_PAT = 0
QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT} ######################################################################
# Install paths
###################################################################### # 这个是安装的配置,比方安装路径等
# 从这里我们能够看到,
# qwt默认安装到/usr/local下。
# 默认建立一下几个主要文件夹doc, include, lib
# 次要主文件夹/plugins/designer, /features
#
#
QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX] unix {
QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION
} win32 {
QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION
} QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc
QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include
QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib ######################################################################
# Designer plugin
# creator/designer load designer plugins from certain default
# directories ( f.e the path below QT_INSTALL_PREFIX ) and the
# directories listed in the QT_PLUGIN_PATH environment variable.
# When using the path below QWT_INSTALL_PREFIX you need to
# add $${QWT_INSTALL_PREFIX}/plugins to QT_PLUGIN_PATH in the
# runtime environment of designer/creator.
###################################################################### QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer # linux distributors often organize the Qt installation
# their way and QT_INSTALL_PREFIX doesn't offer a good
# path. Also QT_INSTALL_PREFIX is only one of the default
# search paths of the designer - not the Qt creator #QWT_INSTALL_PLUGINS = $$[QT_INSTALL_PREFIX]/plugins/designer ######################################################################
# Features
# When building a Qwt application with qmake you might want to load
# the compiler/linker flags, that are required to build a Qwt application
# from qwt.prf. Therefore all you need to do is to add "CONFIG += qwt"
# to your project file and take care, that qwt.prf can be found by qmake.
# ( see http://doc.trolltech.com/4.7/qmake-advanced-usage.html#adding-new-configuration-features )
# I recommend not to install the Qwt features together with the
# Qt features, because you will have to reinstall the Qwt features,
# with every Qt upgrade.
###################################################################### QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
# QWT_INSTALL_FEATURES = $$[QT_INSTALL_PREFIX]/features #
#
#
# 以下这些选项非常重要了, 由于您的qt假设是自编译的,
# 那么非常多第三方库,或者支持库是没有被编译的
# 并且尤其在arm上我们编译qwt时候, 编译那么多无用的支持是无用的
# QWT_CONFIG能够为动态的增减我们须要的库支持
#
######################################################################
# Build the static/shared libraries.
# If QwtDll is enabled, a shared library is built, otherwise
# it will be a static library.
######################################################################
# 选择是编译成静态库还是动态库
QWT_CONFIG += QwtDll ######################################################################
# QwtPlot enables all classes, that are needed to use the QwtPlot
# widget.
###################################################################### QWT_CONFIG += QwtPlot ######################################################################
# QwtWidgets enables all classes, that are needed to use the all other
# widgets (sliders, dials, ...), beside QwtPlot.
###################################################################### QWT_CONFIG += QwtWidgets ######################################################################
# If you want to display svg images on the plot canvas, or
# export a plot to a SVG document
######################################################################
#
QWT_CONFIG += QwtSvg ######################################################################
# If you want to use a OpenGL plot canvas
######################################################################
# 是否支持QwtOpenGL, 依赖于QtOpenGL库
# 不必选,
# 假设您不须要QwtOpenGL支持, 能够凝视
# 假设Qt库中没编译QtOpenGL, 必须凝视, 否则编译出错, 由于找不到依赖的QtOpenGL库
# 提示的错误相似与。找不到qgl.h等有文件
QWT_CONFIG += QwtOpenGL ######################################################################
# You can use the MathML renderer of the Qt solutions package to
# enable MathML support in Qwt. Because of license implications
# the ( modified ) code of the MML Widget solution is included and
# linked together with the QwtMathMLTextEngine into an own library.
# To use it you will have to add "CONFIG += qwtmathml"
# to your qmake project file.
######################################################################
# 是否支持QwtMathMl, 是Qwt统计数据的数学库支持
#
#
#QWT_CONFIG += QwtMathML ######################################################################
# If you want to build the Qwt designer plugin,
# enable the line below.
# Otherwise you have to build it from the designer directory.
######################################################################
# 是否支持QwtDesigner,
#
QWT_CONFIG += QwtDesigner ######################################################################
# Compile all Qwt classes into the designer plugin instead
# of linking it against the shared Qwt library. Has no effect
# when QwtDesigner or QwtDll are not both enabled.
#
# On systems where rpath is supported ( all Unixoids ) the
# location of the installed Qwt library is compiled into the plugin,
# but on Windows it might be easier to have a self contained
# plugin to avoid any hassle with configuring the runtime
# environment of the designer/creator.
###################################################################### win32 {
QWT_CONFIG += QwtDesignerSelfContained
} ######################################################################
# If you want to auto build the examples, enable the line below
# Otherwise you have to build them from the examples directory.
######################################################################
# 是否编译演示样例程序
# qwt默认不编译演示样例程序,
# 假设您想编译演示样例, 请取消凝视
#QWT_CONFIG += QwtExamples ######################################################################
# The playground is primarily intended for the Qwt development
# to explore and test new features. Nevertheless you might find
# ideas or code snippets that help for application development
# If you want to auto build the applications in playground, enable
# the line below.
# Otherwise you have to build them from the playground directory.
###################################################################### #QWT_CONFIG += QwtPlayground ######################################################################
# When Qt has been built as framework qmake wants
# to link frameworks instead of regular libs
###################################################################### macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) { QWT_CONFIG += QwtFramework
}
好了,理解了编译的流程,我们就能够编译了。我们编译依据qt的版本号(x11, x86, arm)。分别编译出不同版本号的qwt
建立编译文件夹
tar -jxvf qwt-6.1.0-tar.gz
cp -rf qwt-6.1.0 qwt-6.1.0-x11
cp -rf qwt-6.1.0 qwt-6.1.0-x86
cp -rf qwt-6.1.0 qwt-6.1.0-arm
编译X11下的qwt库
unix {
QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION
}
安装文件夹。改动/usr/local为qt-4.8.5-x11的文件夹/opt/qt-4.8.5-x11/
unix {
QWT_INSTALL_PREFIX = /opt/qt-4.8.5-x11/qwt-$$QWT_VERSION
}
其它信息事实上不是必需改动,因此我们前面编译qt-x11时候。QtOpenGL等库也编译了,所以不是必需改动
cd qwt-6.1.0-x11
qmake-x11
make
sudo make install
编译x86下的qwt库
首先改动配置文件。方法相似上面,
安装路径改动为/opt/qt-4.8.5-x86/,编译演示样例程序“QWT_CONFIG += QwtExamples”
注意:须要将QWT_CONFIG += QwtOpenGL,此选项须要凝视,由于我们没编译x86的QtOpenGL,
想要知道自己的qt版本号装没装这些库支持。仅仅须要去安扎un个文件夹下的include下查看有没有这些文件夹就能够了
cd qwt-6.1.0-x86
qmake-x86
make
sudo make install
编译arm下的qwt库
首先改动配置文件。方法相似上面。
安装路径改动为/opt/qt-4.8.5-arm/,编译演示样例程序“QWT_CONFIG += QwtExamples”
注意:须要将QWT_CONFIG += QwtOpenGL。此选项须要凝视,由于我们没编译arm的QtOpenGL,
cd qwt-6.1.0-arm
qmake-arm
make
sudo make install
这样我们qwt的三个不同版本号就编译好了,可是我们发现examples的演示样例程序。仅仅是在源代码包里编译好了。并没有安装到安装文件夹/opt/qwt-6.1.0*下
sinusplot显示正弦余弦曲线
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ2F0aWVtZQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" width="500" height="400" />
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ2F0aWVtZQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" width="500" height="350" />
在QtCreate中或者Designer中使用qwt的控件
cp /opt/qt-4.8.5-x11/qwt-6.1.0/designer/plugins/desinger/* $HOME/qtcreate-2.7.2/bin/plugins/designer/
cp /opt/qt-4.8.5-x11/qwt-6.1.0/designer/plugins/desinger/* /opt/qt-4.8.5-x11/plugins/desinger/
验证一下。打开QtCreate新建一个工程
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ2F0aWVtZQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" width="274" height="400" />
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ2F0aWVtZQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" width="220" height="300" />
眼下发现其它的写的比較好的
QT5 qtcreator 增加qwt绘图插件
qwt的安装和移植-的更多相关文章
- qwt的安装与使用
qwt简介 QWT,全称是Qt Widgets for Technical Applications,是一个基于LGPL版权协议的开源项目, 可生成各种统计图. 具体介绍,可参看官方网址:http:/ ...
- Qt编译安装qwt错误moc/xxx Error:126
最近搞设计,需要在上位机上绘制曲线,在网上找了找,发现python的matplotlib和Qt的qwt都不错,本着难度最小原则,选择了Qt下面的qwt,安装过程中遇到了编译错误:moc/xxx Err ...
- qt超强绘图控件qwt - 安装及配置
qwt是一个基于LGPL版权协议的开源项目, 可生成各种统计图.它为具有技术专业背景的程序提供GUI组件和一组实用类,其目标是以基于2D方式的窗体部件来显示数据, 数据源以数值,数组或一组浮点数等方式 ...
- win7 下 qwt安装教程
一.安装:qwt的安装很简单,可以参看它的install文档.1.解开下载下来的zip文件,比如解开到d:\qt\qwt-5.0.2目录下,修改目录下的qwtconfig.pri文件里面的安装路径,比 ...
- paper 139:qt超强绘图控件qwt - 安装及配置
qwt是一个基于LGPL版权协议的开源项目, 可生成各种统计图.它为具有技术专业背景的程序提供GUI组件和一组实用类,其目标是以基于2D方式的窗体部件来显示数据, 数据源以数值,数组或一组浮点数等方式 ...
- net-snmp5.7.3移植到arm-linux平台
net-snmp5.7.3移植到arm-linux平台 本次交叉编译在ubuntu 15.04 64位系统下进行. 准备工作 在编译移植前有几项准备工作需要完成. 1下载net-snmp 5.7.3源 ...
- Qt 之 qwt 和 qwtpolar
1 Qwt Qwt 全称为 Qt Widgets for Technical Applications,用于专业技术领域的可视化显示,如下所示: 左图为自动控制领域,二阶系统的频率响应:中图为德国小 ...
- 【Qt编程】基于QWT的曲线绘制及图例显示操作
在<QWT在QtCreator中的安装与使用>一文中,我们完成了QWT的安装,这篇文章我们讲讲基础曲线的绘制功能. 首先,我们新建一个Qt应用程序,然后一路默认即可.这时,你会发现总共有: ...
- CentOS 6.5结合busybox完成自制Linux系统及远程登录和nginx安装测试
前言 系统定制在前面的博文中我们就有谈到过了,不过那个裁减制作有简单了点,只是能让系统跑起来而,没有太多的功能,也没的用户登录入口,而这里我们将详细和深入的来谈谈Linux系统的详细定制过程和实 ...
随机推荐
- Android新手入门2016(14)--FragmentTabHost实现选项卡和菜单
本文来自肥宝传说之路,引用必须注明出处! 这章憋了好久.本来想写选项卡的,学到TabHost,TabWidget的,把代码拿过来准备研究的时候,发现竟然在4.0.3版本号被废弃了. 百度一下,发如今后 ...
- QT跟VC++结合来进行插件的验证机制(遍历vtable,保证虚函数的个数一致,也可使用Q_INVOKABLE宏定义)
由于最近公司要开发一个以C++插件机制为主的,主要有一个问题就是C++的二进制兼容性的问题.一旦类使用虚函数,只要随便改动下增删查改下头文件的虚函数,就会导致程序在跑的时候进行乱跳,因为这个时候exe ...
- zzulioj--1825-- 会长爱数学(模拟)
1825: 会长爱数学 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 6 Solved: 2 SubmitStatusWeb Board Descr ...
- windows tensorflow 版本与升级
tensorflow 的版本在 1.1.0/1.2.0 之后 api 迎来重大变化,有必要将版本升级到最新的 1.1.0 以上. 1. 使用 upgrade CPU:pip3 install –upg ...
- [SDOI2010] 古代猪文 (快速幂+中国剩余定理+欧拉定理+卢卡斯定理) 解题报告
题目链接:https://www.luogu.org/problemnew/show/P2480 题目背景 “在那山的那边海的那边有一群小肥猪.他们活泼又聪明,他们调皮又灵敏.他们自由自在生活在那绿色 ...
- 将ubuntu安装在用剩下的硬盘改装成的移动硬盘时遇到的问题及解决办法
安装时分完盘后提示:“分配到/的分区开始于3584字节,使用磁盘的最小对齐,这可能造成非常差的性能..." 解决办法: 回到windows使用分区助手等工具先分好盘而不是在安装时分盘(这样分 ...
- POJ 3670 DP LIS?
权值为1~3 好了 此题是水题-- i表示到了第i个数,j表示结尾的数是j f[i][j]=min(f[i][j],f[i-1][k]+(a[i]!=j)) 1<=k<=j 最长上升的. ...
- 重温前端基础之-css浮动之怪异现象
其实,两种情况中box2的内容都是围绕着浮动元素box1来的. 因为:浮动元素会覆盖块元素,但块元素里的内容(内联盒)不会被覆盖,而是围绕着浮动盒. 将box1的背景色去掉,真相就大白了: 此时发现, ...
- 天津大学各种Latex模板共享链接
多元统计课最后Ppt里说要共享一下模板.这里给出链接 https://www.github.com/6gbluewind 注:写本文时还未上传 ************* 下午终于有网了,于是上传了一 ...
- session 存入 memcahce
<?php header('content-type:text/html;charset=utf-8'); class RedisSessionHandler{ public $ttl; //失 ...