i don't know how to debug in console mode but i tried with qt creator .
when i run debug mode ,it still running with no information given ,debugger don't run until the first break point , it's written dbg running .

plot.h :
Qt Code:
  1. #include <QtGui>
  2. #include <qwt_plot.h>
  3. #include <qwt_plot_curve.h>
  4. #include <qwt_plot_marker.h>
  5. #include <qwt_plot_curve.h>
  6. #include <qwt_legend.h>
  7. #include <qwt_series_data.h>
  8. #include <qwt_text.h>
  9. #include <math.h>
  10.  
  11.  
  12. class Plot : public QwtPlot
  13. {
  14. Q_OBJECT
  15. public:
  16. Plot();
  17. ~Plot();
  18. void pointByPoint();
  19.  
  20. private :
  21. QwtPlotCurve *curve;
  22. int currentPointPosition;
  23. QTimer *timer;
  24. double *x;
  25. double *y;
  26.  
  27. public slots:
  28. void onTimeout();
  29. };
To copy to clipboard, switch view to plain text mode 


plot.cpp :
Qt Code:
  1. #include "plot.h"
  2.  
  3. Plot::Plot()
  4. {
  5. x=new double[100];
  6. y=new double[100];
  7.  
  8. for(int i=0;i<100;i++){
  9. x[i]=i;
  10. y[i]=i*i;
  11. }
  12.  
  13. currentPointPosition=1;
  14.  
  15. setTitle("Vitesse et angle de braquage en fonction du temps");
  16. insertLegend(new QwtLegend(), QwtPlot::RightLegend);
  17.  
  18. // Set axes
  19. setAxisTitle(xBottom, "Temps");
  20. setAxisScale(xBottom, 0.0, 100);
  21.  
  22. setAxisTitle(yLeft, "");
  23. setAxisScale(yLeft, 0.0, 100);
  24.  
  25. // add curves
  26. curve = new QwtPlotCurve("Vitesse");
  27. curve->setPen(QPen(Qt::green));
  28. curve->attach(this);
  29. curve->setData(x, y, currentPointPosition);
  30.  
  31. // ...a horizontal line ...
  32. mY->setLabel(QString::fromLatin1("t ( ms )"));
  33. mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
  34. mY->setLineStyle(QwtPlotMarker::HLine);
  35. mY->attach(this);
  36.  
  37. // ...a vertical line ...
  38. mX->setLabel(QString::fromLatin1("V ( m/s ) ,Ang ( rad/s )"));
  39. mX->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
  40. mX->setLineStyle(QwtPlotMarker::VLine);
  41. mX->attach(this);
  42.  
  43. timer = new QTimer();
  44. connect(timer, SIGNAL(timeout()), this, SLOT(onTimeout()));
  45. }
  46.  
  47.  
  48. void Plot::onTimeout(){ //each timeout data will
  49. currentPointPosition++; // be added to the curve
  50. if(currentPointPosition>100) currentPointPosition = 1;
  51. curve->setData(x, y, currentPointPosition);
  52. }
  53.  
  54.  
  55. void Plot::pointByPoint(){ //calling this method provoque painting curve "slowly"
  56. for(int i=0;i<200;i++){
  57. timer->start(500);
  58. }
  59. }
  60.  
  61. Plot::~Plot(){
  62. delete x;
  63. delete y;
  64. }
To copy to clipboard, switch view to plain text mode 


main.cpp
Qt Code:
  1. #include "plot.h"
  2.  
  3. int main(int argc, char **argv)
  4. {
  5. QApplication a(argc, argv);
  6.  
  7. Plot *myPlot = new Plot();
  8. myPlot->autoRefresh();
  9. myPlot->resize(600,400);
  10. myPlot->show();
  11.  
  12. myPlot->pointByPoint();
  13.  
  14. return a.exec();
  15. }
To copy to clipboard, switch view to plain text mode 

.pro :
Qt Code:
  1. TEMPLATE = app
  2. TARGET =
  3. DEPENDPATH += .
  4. INCLUDEPATH += C:\svn\qwt\qwt\src
  5. LIBS += C:\svn\qwt\qwt\lib\qwtd5.dll
  6. CONFIG += debug
  7.  
  8. # Input
  9. SOURCES += main.cpp \
  10. plot.cpp
  11. HEADERS += plot.h
To copy to clipboard, switch view to plain text mode 

i made as comment Q_OBJECT and my slot and it works ,i checked debugger too,it's ok with it under Qtcreator .