笔记
This commit is contained in:
51
QT/补充内容.md
Normal file
51
QT/补充内容.md
Normal file
@ -0,0 +1,51 @@
|
||||
![[kafka_2_消息队列通信的模式.pptx]]![[kafka_1_概念.pptx]]
|
||||
![[kafka_4_消息格式.pptx]]
|
||||
|
||||
![[kafka_3_架构原理.pptx]]
|
||||
|
||||
![[RocketMq_1_原理.pptx]]
|
||||
|
||||
![[RocketMq_2_消息格式.pptx]]
|
||||
|
||||
qcustomplot是一个第三方库,用来绘制图表的,很有名。以后如果遇到绘制图表的需求就会用到它。
|
||||
官网。https://www.qcustomplot.com/index.php/introduction
|
||||
1、 下载后将qcustomplot.cpp和qcustomplot.h加入到工程中。
|
||||
2、 在.pro文件添加打印支持。greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport。否则编译会报错。c++11支持在工程中已经自动添加了。
|
||||
3、 example是例子程序,里面有各种图表。
|
||||
|
||||
![[qcustomplot.zip]]
|
||||
|
||||
![[016cf2ec99554101094703fbf2d0c6ee_.png]]
|
||||
![[aaa800e142788cf565ac37315721a8a0_.png]]
|
||||
![[9880bbadba9f47a4f5ea039bf6a5c589_.png]]
|
||||
![[298e44ff81e6f5da424ed5794b746193_.png]]
|
||||
还有另一个第三方库,也是用来制作图表的,qwt。
|
||||
官网:https://sourceforge.net/projects/qwt/
|
||||
这个库的使用不是把代码添加进来,而是把动态库添加进来。
|
||||
步骤:
|
||||
1、先把qwt-6.1.4.zip解压
|
||||
进入目录下面,用Qt Creator打开qwt.pro文件,即打开了Qwt工程。
|
||||
编译生成的库文件都在build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug下面。
|
||||
|
||||
2、
|
||||
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\lib下的libqwt.a和libqwtd.a复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\lib下。
|
||||
|
||||
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\lib下的qwt.dll和qwtd.dll复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\bin下。
|
||||
|
||||
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\plugins\designer下的qwt_designer_plugin.dll复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\plugins\designer下。
|
||||
|
||||
在D:\Qt\Qt5.12.3\5.12.3\mingw73_32\include下新建一个Qwt的文件夹,将D:\Qwt-6.1.4\src下的所有.h头文件复制到新建的Qwt文件夹下。
|
||||
|
||||
3、新建Qt工程,在.pro文件加入
|
||||
1. DEFINES += QT_DLL QWT_DLL
|
||||
2.
|
||||
3. LIBS += -lqwtd
|
||||
4.
|
||||
5. LIBS += -lqwt
|
||||
6.
|
||||
7. INCLUDEPATH +=D:\Qt\Qt5.12.3\5.12.3\mingw73_32\include\Qwt
|
||||
|
||||
4、使用qt designer(qt creator里面的设计界面会看不到组件,只能看到位置)打开ui界面文件,可以拖拽qwt组件到界面上。
|
||||
|
||||
|
||||
![[qwt-6.1.4.zip]]
|
||||
Reference in New Issue
Block a user