QWT, the full name is QT Widgets for Technical applications, is an open source project based on the LGPL Copyright Agreement, which generates various charts. It provides a GUI component and a set of practical classes for programs with a technical background, with the goal of displaying the data in a 2D-based form part, which is provided as a value, an array, or a set of floating-point numbers, which can be curves (curves), sliders (scrollbars), dials (discs), Compasses (instrument panel) and so on. The tool library is based on QT development, so it inherits the cross-platform features of QT. Now the latest version is 6.1.2, the source is: http://sourceforge.jp/projects/sfnet_qwt/
The list of files available for download is as follows:
where *.zip and *.bz2 end the package for the Windows and Linux platform under the source package, PDF file for the Class library instruction manual, which has a special section on how to compile and install this class library, quite detailed. In addition, *.qch is the appropriate help file, and we can add it to the QT creator Help documentation directory using the QT Creator Documentation wizard.
1 Compiling the source code
First open the previously mentioned PDF file and go to the 3rd chapter where you can find an introduction to the installation as shown in.
The detailed compilation and configuration instructions are described here, which allows us to personalize the installation environment, but here we usually keep the default configuration on the line. Here, I introduce the installation under Windows, similar to Linux, I test, two platforms are not a problem. First, we unzip the Qwt-6.1.2.zip compressed package that we just downloaded. Then, through the cmd command line into the extracted folder root directory:
CD qwt-6.1. 2 qmake Qwt.pro
Executing the above command will generate a makefile file in the current directory. Note that to successfully execute this command, you must also configure the QMAKE environment variable. Next, we need to compile the source code, which I am using MinGW compile:
mingw32- Make
Note that if you are using a multicore CPU, you can also add the-J option after make to speed up the compilation process. When the compilation is complete, the corresponding dynamic link library files and library files are generated. The final step is to install the necessary files to the specified location and execute the following command:
mingw32-makeinstall
If we use the default parameter settings, the installation location of each platform is as follows:
WINDOWSC:\QWT-6.1. 2 Unix like systems/usr/local/qwt-6.1. 2
Of course, you can also specify the installation to a different path, please refer to the PDF manual.
2 Qt creator Add QWT extension
Qt Creator does not automatically detect this class library after QWT installation, so if you need to use this class library in subsequent development, we still need to specify the location of the class library in the project's *.pro file. However, we can allow QT designer to support QWT parts in advance. First find a plugin DLL file under the C:\Qwt-6.1.2\plugins\designer directory, named Qwt_designer_plugin.dll, and then copy the file to C:\Qt\ Qt5.4.1\tools\qtcreator\bin\plugins\designer directory, then start QT Creator, and then open a project with a UI file, we can see the QWT part at the end of the part box. Also, copy one to the C:\Qt\Qt5.4.1\5.4\mingw491_32\plugins\designer directory, so that we can see the same content in Qt Designer, as shown in.
In addition, we can add the Help document *.qch just downloaded to Qt creator. Open the Tools-with Options menu, in the Help sub-option, select Add, and then find the Help file you just downloaded, and you'll see something about QWT in the Help file list.
This way, you can press the F1 key when you need help to find the relevant help information.
Compilation and configuration of QWT