PDA

View Full Version : Qwt ploting financial data



Momergil
12th January 2013, 03:01
Hello Uwe/others!

I'm interested in a Qt/C++ library capable of drawing graphics, specifically with candlesticks.

Doing some research some time ago I found that Qwt didn't provided such functionallity.

The case, though, is that you mentioned in a post at 2009 that to put such functionallities was part of your plans "for the next version".

My question is: was that done?

In case the answer is no, than a totally different question: does somebody knows a Qt/C++ free lib that do such financial plotting nicely?


Thanks,

Momergil

Uwe
12th January 2013, 11:02
The case, though, is that you mentioned in a post at 2009 that to put such functionallities was part of your plans "for the next version". My question is: was that done?
Sure - see QwtPlotTradingCurve (http://qwt.sourceforge.net/6.1/class_qwt_plot_trading_curve.html). The stockcharts example shows how to use it.

Qwt 6.1 is in a state, where I'm waiting for user feedback about all the new stuff. So use your chance to tell me what I might have forgotten before the final version is out and I have to take care of binary compatibilities.

Uwe

Momergil
12th January 2013, 13:48
Sure - see QwtPlotTradingCurve (http://qwt.sourceforge.net/6.1/class_qwt_plot_trading_curve.html). The stockcharts example shows how to use it.

Qwt 6.1 is in a state, where I'm waiting for user feedback about all the new stuff. So use your chance to tell me what I might have forgotten before the final version is out and I have to take care of binary compatibilities.

Uwe

Oh yeah!

Now I found a problem: where is version 6.1 to be downloaded? in the sourceforge page [http://qwt.sourceforge.net/6.1/index.html] only 5.2, 6.0 and "development snapshot from the SVN repository" are mentioned, and when I enter in sourceforge donwload's page [http://sourceforge.net/projects/qwt/] the version to be downloaded is 4.2.0!

Uwe
12th January 2013, 14:21
All information is available on the Qwt project page: http://qwt.sourceforge.net/

Uwe

Momergil
12th January 2013, 15:00
O.K., I managed to find it.

Now I found a problem while building: [http://www.qtcentre.org/threads/52773-Problem-building-Qwt-with-MingW?p=236357]


Thanks,

Momergil

Uwe
12th January 2013, 15:10
A problem of rc1, you need rc2.

Uwe

Momergil
12th January 2013, 16:19
yeah, it worked fine now.

My last problem (I hope so!): I included qwt in my pro file:

QT += core gui network sql qwt

CONFIG += qwt


But I'm still incapable of accessing the classes. What is missing? I read in the install file about a QWT_DLL that I should include somewhere, but neither I understood where, nor I was able to find that DLL.

Uwe
12th January 2013, 16:42
CONFIG += qwt
That's enough, when you did a "make install" before.


read in the install file about a QWT_DLL that I should include somewhere, ...
QWT_DLL is mentioned in the section about what to do, when not working with qmake. Instead this is what you need to do:



configure qmake to find qwt.prf ( C:\Qwt-6.1-rc2\features ) : https://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html#adding-new-configuration-features
extend your PATH so that qwt libraries can be found


Uwe

Momergil
12th January 2013, 16:53
That's enough, when you did a "make install" before.


QWT_DLL is mentioned in the section about what to do, when not working with qmake. Instead this is what you need to do:



configure qmake to find qwt.prf ( C:\Qwt-6.1-rc2\features ) : https://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html#adding-new-configuration-features
extend your PATH so that qwt libraries can be found


Uwe

yes - a mingw32-make install.

well since I use qmake, I don't need QWT_DLL then.

Now The first part I understood that that is what I did: CONFIGURE += qwt , and qmake understand it to be qwt.prf. (this is what I understood from the link you provided).

Now what about that PATH? In fact, since I began working with Qt I hear about this PATH and dever actually found it :P where exactly is that thing and how to edit it?

Edit: if by PATH you mean the environment variable we can change in Windows by going to System and System Advanced Proprieties and adding ";C:\Qwt-6.1.0-rc2\lib" to the end, OK, I did that step already, but how does that relates to Qt?

Momergil
13th January 2013, 02:46
OK, i think i managed to do some things...

after more carefull search, I understood the PATH variable and edited it so to include ";C:\Qwt-6.0.1\lib" as indicated in this post: http://www.qtcentre.org/threads/47151-How-I-installed-Qwt-6-0-1-the-Uwe-way-on-a-Windows7-Xp-32-bit-machine?highlight=qwt+install

I have the CONFIG += qwt in my .pro file as well. Now what more is needed in order to be able to include that files?

Momergil
13th January 2013, 16:58
Ok, I think everything is right now - despite the fact that I'm not sure this was the way I was supposed to do.

In case, I create a no-extension file with includes of the .h from C:\... that I needed to my project and included it in mainwindow.h:



/*
Copyright (c) 2013 - Martin Bittencourt

This file includes all relevant qwt classes for mShare.
*/

#ifndef QWTMSHARE_H
#define QWTMSHARE_H

#include "C:\Qwt-6.1.0-rc2\include\qwt.h"
#include "C:\Qwt-6.1.0-rc2\include\qwt_plot.h"
#include "C:\Qwt-6.1.0-rc2\include\qwt_plot_curve.h"
#include "C:\Qwt-6.1.0-rc2\include\qwt_plot_grid.h"
#include "C:\Qwt-6.1.0-rc2\include\qwt_plot_tradingcurve.h"

#endif // QWTMSHARE_H



So thanks Uwe for everything!

Last question: where should I give the feedback? I already have some ideas! :)