PDA

View Full Version : Simple MANUAL / GUIDE for including QWT in your application



falconium
26th April 2011, 02:12
Add all *.cpp and *.h files from QWT project directory to your project (best if you copy them under your program directory, so shorter path is enough).

Add these to your <your application>.PRO file:

QT += svg
INCLUDEPATH += <path to qwt>/qwt

Take one of the examples for playing with and include the source/header files of it also in your project.

E.g.:

CpuPlot *cpuPlot = new CpuPlot;
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(cpuPlot);

Voila, that's all! Don't rob your time with compiling QWT, including DLLs or other complex stuffs. ;)

corrado1972
26th April 2011, 09:10
Yes, it works: this is a short way to use Qwt in you application, embedding surces in your code compiled.
The standard way, compiling separately Qwt and using the dll, it's more product oriented.

For example, suppose that Qwt will release a bugfix: in your solution, you must recompile your application and make a new release of it, in the standard case, only Qwt dlls will be recompiled and released wothout versioning your application :).

My advice is to keep separate the libraries from you application.
bye

Uwe
26th April 2011, 09:33
Turning my irony detector off: obviously this is no solution for your problem of installing a designer plugin and using it inside the Creator. And of course you have to take care of license implications.

I have a serious problem with postings like yours - not because of what you are writing, but with where you are posting. This forum is read by users looking for solutions for problems they have with installing or using Qwt. But then they find useless hints like this one or advices, that might have worked to a certain degree in a special environment for some old version of Qwt.

Unfortunately the archive of this forum has already become a source for confusion instead of helping about installing Qwt. I absolutely don't want to censor something, but it would have been better if I had removed all threads with misinformation in the beginning.

In the end the reason for all these installation problems is, that too many Windows people are not used to work with source packages and there is no concept of a distribution - like in the Linux world, where packagers build binary packages for you.

Uwe

falconium
28th April 2011, 05:25
Hi,

You both have truth in your words, and I also on this view. As Uwe said, yes, I'm using it on Windows platform, and I tucked right at the beginning of creating the plugin for Designer. I would need to recompile Qt from source, since that was not compiled with mingw, but msvc - if I remember well. When I wanted to create a dll, I was able to do that, but only debugger version, not release version and couldn't use it. I didn't find a good manual in the archive describing everything step by step for different purposes, but lots of confusion - as you said. It might be good to have a proper sticky thread on the top.
Sorry for the thread, but I only wanted to help newbies like me on Win platform.