QWT installation and configuration under Windows environment

Source: Internet
Author: User
Tags qt designer

**

1.QWT Download Path

**:https://sourceforge.net/projects/qwt/
The main download of these three files: Qwt-6.1.2.zip. Qwt-6.1.2.pdf,qwt-6.1.2.qch.


QWT-6.1.2.ZIP:QWT related source code
Qwt-6.1.2.pdf: User manual with installation instructions and class library instructions
QWT-6.1.2.QCH:QWT Help documentation that can be added to Qt creator.

2.QWT compilation, there are two main: a) the use of command-line compilation

The command-line compilation is based on the QT version number you have installed. I installed the MinGW version, so the following command line operation for this version number, the operation of the other version number can refer to qwt-6.1.2.pdf.

1. Unzip the Qwt-6.1.2.zip and enter the qwt-6.1.2 directory via CMD to run:
Qmake Qwt.pro

When finished, run:
Mingw32-make

Last run:
Mingw32-make Install

And then just wait and wait ...

No, easy. After compiling the installation, there may be some questions. Where is the QWT where we compiled the installation? Then you unzip the directory qwt-6.1.2 under a file QWTCONFIG.PRI. To open a look:

Qwt_install_prefix=$$[Qt_install_prefix]unix {Qwt_install_prefix=/usr/local/qwt-$$qwt_version#Qwt_install_prefix=/usr/local/qwt-$$qwt_version-qt-$$qt_version}win32 {Qwt_install_prefix=C:/QWT-$$qwt_version#Qwt_install_prefix=C:/QWT-$$qwt_version-qt-$$qt_version}Qwt_install_docs=$${Qwt_install_prefix}/docqwt_install_headers=$${Qwt_install_prefix}/includeQwt_install_libs=$${Qwt_install_prefix}/lib

Very well understood, here is the path that you have specified to install. It can be concluded that our QWT is installed in the C:\Qwt-6.1.2 directory and is able to enter this directory. We'll find out.

These are the compiled content.

b) Qt Creator compilation

Use QT Creator to open the Qwt.pro under the decompression path E:\work\qwt-6.1.2. Then the debug and release are compiled once, then the E:\work\qwt-6.1.2 directory will generate two directories build-designer-desktop_qt_5_5_1_mingw_ 32bit-debug and Build-designer-desktop_qt_5_5_1_mingw_32bit-release.


We just need to build-designer-desktop_qt_5_5_1_mingw_32bit-release.


This compilation is simple, after the click is .... The result of compiling it is in the-debug and-release directories.

3.QWT Configuration

Copy work:
A. Copy the LIBQWT.A and libqwtd.a from the C:\Qwt-6.1.2\lib to the E:\software\Qt\Qt5.5.1\5.5\mingw492_32\lib directory
B. Copy the Qwt.dll and Qwtd.dll from the C:\Qwt-6.1.2\lib to the E:\software\Qt\Qt5.5.1\5.5\mingw492_32\bin directory
C. Copy Qwt_designer_plugin.dll from C:\Qwt-6.1.2\plugins\designer to E:\software\Qt\Qt5.5.1\5.5\mingw492_32\plugins\ In the designer directory
D. Create a new QWT directory under the E:\software\Qt\Qt5.5.1\5.5\mingw492_32\include directory and copy everything C:\Qwt-6.1.2\include this directory into the QWT directory you just created

This QWT configuration is complete.

4. Test

1. Then we open QT Creator, a new project named Qwtdemo, then the default. What you see:

2. At this point we select the interface file Mainwindow.ui, right click Select With ... Open it. Choose QT Designer and see:

3. The Qt Designer pops up and the QWT widgets control appears at the bottom of the control form.
Then we casually drag a control qwtanalogclock to the form.

4. The final step is also the most important step. We need to add the following statement to our new project file, the Qwtdemo.pro file, for example:

DEFINES += QT_DLL QWT_DLLLIBS += -L"E:\software\Qt\Qt5.5.1\5.5\mingw492_32\lib" -lqwtdLIBS += -L"E:\software\Qt\Qt5.5.1\5.5\mingw492_32\lib" -lqwtINCLUDEPATH += E:\software\Qt\Qt5.5.1\5.5\mingw492_32\include\Qwt

and then run. The result is what we expect, such as:

Note:
In the end, the pit that I stepped into during the installation:
The 1.qwt-6.1.2.zip decompression path contains Chinese. There is always a mistake in the final installation process.


For the first time, 2.qwt.pro ran debug and release at a. Copy the qwt-6.1.2 directory and open and compile it again. The path it points to is still a. At this point, you need to change the project--build directory to change the build directory.
3. Assume that Mingw32-make is used at the command line. Tip is not an internal command, remember to add the full path that qt\qt5.5.1\tools\mingw492_32\bin points to in path.

QWT installation and configuration under Windows environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.