1qwtinstall(3)                  Qwt User's Guide                  qwtinstall(3)
2
3
4

NAME

6       qwtinstall - Installing Qwt
7
8

Download

10       Stable Qwt releases are available from the Qwt project page.
11
12       Qwt-6.1.4 consists of 4 files:
13
14       · qwt-6.1.4.zip
15          Zip file with the Qwt sources and the html documentation for Windows
16
17       · qwt-6.1.4.tar.bz2
18          Compressed tar file with the Qwt sources and the html documentation
19         for UNIX systems ( Linux, Mac, ... )
20
21       · qwt-6.1.4.pdf
22          Qwt documentation as PDF document.
23
24       · qwt-6.1.4.qch
25          Qwt documentation as Qt Compressed Help document, that can be loaded
26         into the Qt Assistant or Creator. In the Qt Creator context sensitive
27         help will be available like for Qt classes.
28
29       Precompiled Qwt Designer plugins, that are compatible with some binary
30       packages of the Qt Creator:
31
32       · qwtdesigner-6.1.4-*.zip
33

Installing Qwt

35       Beside headers, libraries and the html version of the class
36       documentation a proper Qwt installation contains a Designer plugin and
37       a Qwt features file for building applications using Qwt.
38
39       All files will be copied to an installation directory, that is
40       configurable by editing qwtconfig.pri. Its default settings is:
41
42       · Windows
43          C:\Qwt-6.1.4
44
45       · Unix like systems
46          /usr/local/qwt-6.1.4
47
48       For the rest of the document this install path will be written as
49       ${QWT_ROOT} and needs to be replaced by the real path in all commands
50       below.
51
52       It is not unlikely, to have more than one installation of Qwt on the
53       same system. F.e for using the Qwt Designer plugin in the Qt Creator a
54       version of Qwt is necessary with the same Qt and compiler combination,
55       that had been used for building the Qt Creator ( see 'Help->About Qt
56       Creator ...' ).
57
58       Installing Qwt is done in 3 steps, that are quite common on UNIX
59       systems.
60
61       1.  Configuration
62            In the configuration step all parameters are set to control how to
63           build and install Qwt
64
65       2.  Build
66            In the build step binaries are built from the source files.
67
68       3.  Installation
69            The installation copies and rearranges all files that are
70           necessary to build Qwt applications to a target directory.
71
72       The installation doesn't modify the system beside copying files to a
73       directory in a proper way. After removing build and installation
74       directories the system is in the same state as it was before.
75
76   Configuration
77       Configuring Qwt has to be done by editing the Project files used for
78       building:
79
80       · qwtbuild.pri
81          qwtbuild.pri contains settings for how to build Qwt. All settings of
82         this file are only for building Qwt itself and doesn't have an impact
83         on how an application using Qwt is built. Usually its default
84         settings doesn't need to be modified.
85
86       · qwtconfig.pri
87          qwtconfig.pri defines what modules of Qwt will be built and where to
88         install them. qwtconfig.pri gets installed together with the Qwt
89         features file qwt.prf and all its settings are known to project files
90         for building Qwt applications.
91
92       In qwtconfig.pri the meaning of each option is explained in detail -
93       it's worth reading it before running into problems later.
94
95   Build and installation
96       The Qt Creator is a graphical frontend for calling qmake/make and -
97       technically - it could be used for building and installing Qwt. But as
98       this way requires a lot more understanding of details the following
99       step by step instructions are for the easier way using the command
100       line.
101
102   Unix-like systems
103       The first step before creating the Makefile is to check that the
104       correct version of qmake is used. F.e. on older Linux distribution you
105       often find a Qt3 qmake and in the path.
106
107       The default setting of qmake is to generate a makefile that builds Qwt
108       for the same environment where the version of qmake has been built for.
109       So creating a makefile usually means something like:
110
111       cd qwt-6.1.4
112       /usr/local/Qt-5.0.1/bin/qmake qwt.pro
113
114       The generated Makefile includes all paths related to the chosen Qt
115       version and the next step is:
116
117       make
118
119        ( On multicore systems you can speed up building the Qwt libraries
120       with running several jobs simultaneously: f.e. 'make -j4' on a dual
121       core. )
122
123       Finally you have to install everything below the directories you have
124       specified in qwtconfig.pri. Usually this is one of the system
125       directories ( /usr/local, /opt, ... ) where you don't have write
126       permission and then the installation needs to be done as root:
127
128       sudo make install
129
130        ( On systems where sudo is not supported you can do the same with: su
131       -c 'make install' )
132
133   Windows
134       Qt packages offer a command line interface, that can be found in the Qt
135       application menu: f.e 'All Programs -> Qt -> Command Prompt'. It is not
136       mandatory to use it, but probably the easiest way as it offers an
137       environment, where everything is initialized for a version of Qt ( f.e
138       qmake is in the PATH ).
139
140       Creating a makefile usually means something like:
141
142       cd qwt-6.1.4
143       qmake qwt.pro
144
145       The generated makefile includes all paths related to the chosen Qt
146       version.
147
148   MinGW
149       For MinGW builds the name of the make tool is 'mingw32-make'
150
151       mingw32-make
152
153        ( On multicore systems you can speed up building the Qwt libraries
154       with running several jobs simultaneously: 'mingw32-make -j' )
155
156       Finally you have to install everything below the directories you have
157       specified in qwtconfig.pri.
158
159       mingw32-make install
160
161   MSVC
162       For MSVC builds the name of the make tool is 'nmake'. Alternatively it
163       is possible to use 'jom' ( https://wiki.qt.io/Jom ), that is usually
164       included in a Qt Creator package.
165
166       nmake
167
168       Finally you have to install everything below the directories you have
169       specified in qwtconfig.pri.
170
171       nmake install
172

Qwt and the Qt tool chain

174   Designer plugin
175       The Designer plugin and the corresponding Qwt library ( if the plugin
176       has not been built self containing ) have to be compatible with Qt
177       version of the application loading it ( usually the Qt Creator ) - what
178       is often a different version of the Qt libraries you want to build your
179       application with. F.e on Windows the Qt Creator is usually built with a
180       MSVC compiler - even if included in a MinGW package !
181
182       To help Qt Designer/Creator with locating the Qwt Designer plugin you
183       have to set the environment variable QT_PLUGIN_PATH, modify qt.conf -
184       or install the plugin to one of the application default paths.
185
186       The Qt documentation explains all options in detail:
187
188       · https://doc.qt.io/qt-5/deployment-plugins.html
189
190       · https://doc.qt.io/qtcreator/adding-plugins.html
191
192       F.e. on a Linux system you could add the following lines to .bashrc:
193
194       QT_PLUGIN_PATH="${QWT_ROOT}/plugins:$QT_PLUGIN_PATH"
195       export QT_PLUGIN_PATH
196
197       When the plugin has not been built including the Qwt library ( see
198       QwtDesignerSelfContained in qwtconfig.pri ) the Qt Designer/Creator
199       also needs to locate the Qwt libraries. On Unix systems the path to the
200       installed library is compiled into the plugin ( see rpath, ldd ), but
201       on Windows the Qt Creator needs to be configured ( ( Running a Qwt
202       application ) in the same way as for any application using Qwt.
203
204       In case of problems the diagnostics of Qt Creator and Designer are very
205       limited ( usually none ), but setting the environment variable
206       QT_DEBUG_PLUGINS might help. In the Qt Creator it is possible to check
207       which plugins were loaded successfully and for certain problems it also
208       lists those that were recognized but failed ( Tools > Form Editor >
209       About Qt Designer Plugins ).
210
211   Online Help
212       The Qwt class documentation can be loaded into the Qt Creator:
213
214       · open the settings dialog from the Tools->Options menu
215
216       · raise the tab 'Help->Documentation'.
217
218       · press the Add button and select qwt-6.1.4.qch.
219
220       Now the context sensitive help ( F1 ) works for Qwt classes.
221
222       For browsing the documentation in the Qt Assistant:
223
224       · open the settings dialog from the Edit->Preferences menu
225
226       · raise the tab Documentation.
227
228       · press the Add button and select qwt-6.1.4.qch.
229

Building a Qwt application

231       All flags and settings that are necessary to compile and link an
232       application using Qwt can be found in the file
233       ${QWT_ROOT}/features/qwt.prf.
234
235       When using qmake it can included from the application project file in 2
236       different ways:
237
238       · Adding Qwt as qmake feature
239
240          When using the qmake feature mechanism you can bind a special
241         version of qmake to a special installation of Qwt without having to
242         add this dependency to the application project. How to add Qwt as
243         feature is documented in the qmake docs.
244
245       After adding Qwt as a feature f.e on Linux as a persistent property
246       ....
247
248       qmake -set QMAKEFEATURES ${QWT_ROOT}/features
249
250
251        .. the following line can be added to the application project file:
252
253       CONFIG += qwt
254
255
256       · Including qwt.prf in the application project file
257
258          Instead of using qwt.prf as qmake feature it can be included from
259         the application project file:
260
261
262       include ( ${QWT_ROOT}/features/qwt.prf )
263
264        The advantage of using a direct include is, that all settings of
265       qwt.prf are known to the application project file ( qmake features are
266       included after the application project file has been parsed ) and it
267       can be implemented depending on - f.e. settings made in qwtconfig.pri.
268
269       On Unix platforms it is possible to link a runtime path into the
270       executable, so that the location of the Qwt libraries can be found
271       without having to configure a runtime environment:
272
273       · QMAKE_LFLAGS_RPATH
274
275       · QMAKE_RPATH
276
277       · QMAKE_RPATHDIR
278

Running a Qwt application

280       When using Qwt as shared library ( DLL ) the dynamic linker has to find
281       it according to the rules of the operating system.
282
283   Windows
284       The only reasonable way to configure the runtime environment - without
285       having to copy the Qwt libraries around - is to modify the PATH
286       variable. F.e. this could be done by adding the following line to some
287       batch file:
288
289       set PATH=%PATH%;${QWT_ROOT}
290
291   GNU/Linux
292       Read the documentation about:
293
294       · ldconfig
295
296       · /etc/ld.so.conf
297
298       · LD_LIBRARY_PATH
299
300       Using the ldd command a configuration can be tested.
301
302
303
304Version 6.1.4                   Wed Jan 2 2019                   qwtinstall(3)
Impressum