Use QWT Library in Qt to Display Seismic Waveforms Part I: Install QWT

2D figures can be created by use of an open-source library, i.e. QWT, when developers use Qt Creator or Visual Studio plus Qt add-ins to develop GUI applications.

The Qwt library contains GUI Components and utility classes which are primarily useful for programs with a technical background. Beside a framework for 2D plots it provides scales, sliders, dials, compasses, thermometers, wheels and knobs to control or display values, arrays, or ranges of type double.

Here’s an tutorial on how to configure Qt plus QWT library development environment as well as how to draw 2D plots related to microseismic imaging, e.g. geophone array mapping, waveform display.

Compiling QWT library
Compiling QWT library

Detailed steps are as follows:

  1. Download Qt and QWT and choose the right version for yourself. All versions of Qt can be found in the Qt Download Archive (Here I choose Qt5.7.0(MinGW) and QWT6.1.3 on Windows 7 OS to present a demo workflow).
  2. Install Qt. Here I install Qt in path: C:\Qt\Qt5.7.0\.
  3. Use Qt Creator to build Qwt source code and this process may take more than 30mins. In this case, I put qwt-6.1.3 directory in path: D:\qwt-6.1.3. And the compiled files will be stored in path: D:\build-qwt-Desktop_Qt_5_7_0_MinGW_32bit-Debug\.
  4. Copy compiled files to corresponding Qt installation directories.
    1. Copy  two files, i.e. libqwt.a and libqwtd.a  under directory D:\build-qwt-Desktop_Qt_5_7_0_MinGW_32bit-Debug\lib\ to Qt installation directory C:\Qt\Qt5.7.0\5.7\mingw53_32\lib\.
    2. Copy two files, i.e. qwt.dll and qwtd.dll under directory D:\build-qwt-Desktop_Qt_5_7_0_MinGW_32bit-Debug\lib\ to Qt installation directory C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\.
    3. Copy two files, i.e. libqwt_designer_plugin.a and qwt_designer_plugin.dll under directory D:\build-qwt-Desktop_Qt_5_7_0_MinGW_32bit-Debug\designer\plugins\designer\ to Qt installation directory C:\Qt\Qt5.7.0\5.7\mingw53_32\plugins\designer\.
    4. Create a new folder QWT\ in directory C:\Qt\Qt5.7.0\5.7\mingw53_32\include\, and copy all .h and .cpp files under directory D:\qwt-6.1.3\src\ into the newly created folder, i.e. C:\Qt\Qt5.7.0\5.7\mingw53_32\include\QWT\.
  5. When all 4 steps listed above are completed, restart Qt Creator and open a new Qt Widget project, use Qt Designer (not the default double-click view) to view the UI, you will find the Qwt Widgets has already been in the bottom-left of the window, just under the default built-in Display Widgets!
Qwt Widgets on Qt Designer
Qwt Widgets on Qt Designer

Watch Full Movie Online Streaming Online and Download