QwtPlot. Promote to...
-
Hello! This is my steps:
-
I created a MainWindow application
-
I added in the .pro file this code:
[CODE]QWT_LOCATION = c:/Qwt-6.1.0
INCLUDEPATH += $${QWT_LOCATION}/include
LIBS = -L$${QWT_LOCATION}/lib
-lqwtd[/CODE] -
I create the class "Plot":
Plot.h
[CODE]
#ifndef PLOT_H
#define PLOT_H#include "qwt_plot.h"
class Plot : public QwtPlot
{
public:
Plot( QWidget *parent = 0 );
};#endif // PLOT_H
[/CODE]Plot.cpp
[CODE]
#include "Plot.h"Plot::Plot( QWidget *parent ) :
QwtPlot( parent )
{
}
[/CODE]- I opened the file "MainWindow.ui" and I put on the form the widget "Widget"
- I promoted the "Widget" to "Plot"
- I ran my application and received this message:
[QUOTE]The program has unexpectedly finished.[/QUOTE]
-
-
This application doesn't work too:
VerySimplePlot.pro
[CODE]QT += widgets
INCLUDEPATH += "C:/Qwt-6.1.0/include"
LIBS += "C:/Qwt-6.1.0/lib/libqwtd.a"SOURCES +=
main.cpp
[/CODE]main.cpp
[CODE]#include <QApplication>
#include "qwt_plot.h"int main( int argc, char *argv[] )
{
QApplication app( argc, argv );QwtPlot plot; plot.show(); app.exec();
}
[/CODE]Output:
[QUOTE]
The program has unexpectedly finished.
[/QUOTE] -
Hi,
What does a run through the debugger tells you ?
-
This is all what I have:
http://i.pixs.ru/storage/9/5/9/300png_5816215_13587959.png -
A dll can't be found, so I guess that the Qwt dll(s) can't be found. Go in the run part for the Project panel, edit the PATH environment variable and add there the path to the folder containing the Qwt dlls
-
SGaist, thank you for reply!
I think it is because I built Qwt in Qt5.1.1 and I try to use it in Qt5.3.1
P.S. I will use QCustomPlot: http://www.qcustomplot.com/index.php/tutorials/settingup
-
You're welcome !
When it comes to designer plugins, you need to match the Qt version used to build Qt Creator and the one used to build the plugin.
-
Why do you talk about plugins? Is it useful for Qt developer? What does it give?
-
Because when you want to use a custom widget in Designer, you have to use a plugin. Qwt provides one to use it's sets of widgets with Designer.
Look at the "Adding Qt Designer Plugins" chapter from the documentation for more informations
-
What do you think about QCustomPlot, QChart and MathGL? Are they better than Qwt?
-
I can't comment, I've only used Qwt so far as it suited my needs pretty well.