Introduction Qcustomplot is a QT-based drawing and data visualization C + + control. Qcustomplot is committed to providing a beautiful interface, high-quality 2D drawings, drawings and graphs, while providing a good solution for real-time data visualization applications.
Get
: Http://qcustomplot.com/index.php/download,QCustomPlot.tar.gz, currently updated to version 1.3.1.
Official website: http://qcustomplot.com/index.php/introduction
Forum: Http://qcustomplot.com/index.php/support/forum
Use
There are 2 ways to use Qcustomplot in your app:
1. Add the downloaded qcustomplot.h and qcustomplot.cpp to your project. in the file you want to use qcustomplot:
#include "Qcustomplot.h"
Then use it as you would with Qwidget, because Qcustomplot is also inherited from Qwidget:
Qcustomplot *MYQCP = new Qcustomplot;
With QT Designer, in a qwidget control right-click, promote to ...,
Then in the popup dialog box, enter Qcustomplot in the promotion to the class name, and the header file will be automatically populated as qcustomplot.h. Click the Add button to join Qcustomplot to the list of promoted classes, and then click Promote.
Note: You will not see any changes immediately after the promotion, but when you run the program, you will see that the controls have coordinates and grids.
2. Do not includeQcustomplot.h andQcustomplot.cpp, simply introduce qcustomplot.so (gnu/linux) or qcustomplot.dll(mswindows) File The next step is to compile the qcustomplot library:
First, From download qcustomplot-sharedlib, then copy qcustomplot.h and qcustomplot.cpp to the same directory as Qcustomplot-sharedlib, then enter the Sharedlib-compilation directory in the command line mode, run Qmake; Mingw32-make, wait a moment will produce two folders debug and release, there are Qcustomplot library debug and release version, Windows is. Dll,linux is. A (and the official website says. So, a little out of the box?) And then how to use the Qcustomplot is very simple, I will not say--
Note: If you are using a QT version above 5.0, you need to add Printsupport to the QT variable in the. Pro file,
GreaterThan (Qt_major_version, 4): QT + = Widgets Printsupport
This is because the old version of QT does not support widgets and Printsupport.
using Help in Qtcreator
Under the Documentation folder downloaded in the second step, there is a qcustomplot.qch file, copy it to a directory, such as qtcreator the installation directory, and then the qtcreator, tools, Options, help, Documentation, add, select Span style= "Color:rgb (53,53,53); Font-family:georgia,serif; font-size:14px; line-height:19.5px ">qcustomplot.qch file, OK, later press F1 can jump to qcustomplot's help document.
effect
Well, the first article mainly introduces Qcustomplot and its construction.
Qcustomplot User Manual (i)