Results 1 to 3 of 3

Thread: qwtplot program in Qt 4.3.3 with VS2005 not working

  1. #1
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question qwtplot program in Qt 4.3.3 with VS2005 not working

    Hi Friends,
    I am using Qwt plugin with Qt4.3.3 with VS2005 in WinXP to design a GUI.I have created a QWidget in Qt, added QwtPlot Widget to it named it testqwtPlot and coded the following files: - Hey pls tell me if this program is right.

    ---------- graphplot.h----------
    Qt Code:
    1. #ifndef GRAPHPLOT_H
    2. #define GRAPHPLOT_H
    3. #include <QtGui>
    4. #include <QWidget>
    5. #include "ui_graphplot.h"
    6. #include <qwtplot.h>
    7.  
    8. using namespace Ui;
    9. class graphplot : public QWidget, public Ui_testQwtPlot
    10. {
    11. Q_OBJECT
    12.  
    13. public:
    14. graphplot(QWidget *parent = 0, Qt::WFlags flags = 0);
    15. ~graphplot();
    16.  
    17. private:
    18. Ui::graphplotClass ui;
    19. };
    20.  
    21. #endif
    To copy to clipboard, switch view to plain text mode 


    -----------graphplot.cpp-------------
    Qt Code:
    1. #include "graphplot.h"
    2. #include <QtGui>
    3. #include <QWidget>
    4.  
    5. graphplot::graphplot(QWidget *parent, Qt::WFlags flags)
    6. : QWidget(parent, flags)
    7. {
    8. setupUi( this );
    9. //setupUi(parent);
    10. qwtPlot->setAxisTitle(QwtPlot::xBottom, "Time/seconds");
    11. qwtPlot->setAxisScale(QwtPlot::xBottom, 0, 100);
    12. qwtPlot->setAxisTitle(QwtPlot::yLeft, "Values");
    13. qwtPlot->setAxisScale(QwtPlot::yLeft, 0, 50);
    14. }
    15.  
    16. graphplot::~graphplot()
    17. {
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 

    And this is the self generated main.cpp

    ------------ main.cpp--------------
    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include "graphplot.h"
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication a(argc, argv);
    7. graphplot w;
    8. w.show();
    9. a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
    10. return a.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 

    Right now in the above program i am just trying to change only the AxisTitle and Axis Scale. Once this works i will try to plot a simple graph on the qwtplot widget on .ui form. But i get this error
    1>c:\qt\4.3.3\qwt\qwt-5.0.2\qwt-5.0.2\examples\graphplot\graphplot\graphplot.h(7) : fatal error C1083: Cannot open include file: 'qwtplot.h': No such file or directory

    I even added the include path in the project Properties window. But i still get the error.What are the change's needed in the program for it to work.
    I am stuck here for the past 3 dazz pls Help me friend's. !!

    I will be really ThankFull to u guy's.
    Regards
    Dhee

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qwtplot program in Qt 4.3.3 with VS2005 not working

    But i get this error
    1>c:\qt\4.3.3\qwt\qwt-5.0.2\qwt-5.0.2\examples\graphplot\graphplot\graphplot.h(7) : fatal error C1083: Cannot open include file: 'qwtplot.h': No such file or directory
    The name of the file is qwt_plot.h.

    Uwe

  3. #3
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwtplot program in Qt 4.3.3 with VS2005 not working

    Hi thank You for the reply. That error was cleared. Hey and is this program fine. Cause i have so many new errors up now. pls tell me the change's i need to do here.So that it works fine.


    Qt Code:
    1. 1>moc_graphplot.cpp
    2. 1>c:\qt\4.3.3\qwt\qwt-5.0.2\qwt-5.0.2\examples\graphplot\graphplot\generatedfiles\release\../../graphplot.h(11) : error C2504: 'qwtPlot' : base class undefined
    3. 1>.\GeneratedFiles\Release\moc_graphplot.cpp(52) : error C2061: syntax error : identifier 'qwtPlot'
    4. 1>main.cpp
    5. 1>c:\qt\4.3.3\qwt\qwt-5.0.2\qwt-5.0.2\examples\graphplot\graphplot\graphplot.h(11) : error C2504: 'qwtPlot' : base class undefined
    6. 1>graphplot.cpp
    7. 1>c:\qt\4.3.3\qwt\qwt-5.0.2\qwt-5.0.2\examples\graphplot\graphplot\graphplot.h(11) : error C2504: 'qwtPlot' : base class undefined
    8. 1>.\graphplot.cpp(9) : error C3861: 'setupUi': identifier not found
    9. 1>.\graphplot.cpp(10) : error C2065: 'pane' : undeclared identifier
    10. 1>.\graphplot.cpp(10) : error C2227: left of '->setAxisTitle' must point to class/struct/union/generic type
    11. 1> type is ''unknown-type''
    12. 1>.\graphplot.cpp(11) : error C2227: left of '->setAxisScale' must point to class/struct/union/generic type
    13. 1> type is ''unknown-type''
    14. 1>.\graphplot.cpp(12) : error C2227: left of '->setAxisTitle' must point to class/struct/union/generic type
    15. 1> type is ''unknown-type''
    16. 1>.\graphplot.cpp(13) : error C2227: left of '->setAxisScale' must point to class/struct/union/generic type
    17. 1> type is ''unknown-type''
    18. 1>Generating Code...
    19. 1>Build log was saved at "file://c:\Qt\4.3.3\QWT\qwt-5.0.2\qwt-5.0.2\examples\graphplot\graphplot\Release\BuildLog.htm"
    20. 1>graphplot - 10 error(s), 0 warning(s)
    21. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    To copy to clipboard, switch view to plain text mode 

    Thank You
    Regard's

Similar Threads

  1. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.