Results 1 to 11 of 11

Thread: qwt problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    39
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt problem

    please provide me simple example of how to make a simple plot only consisting of axes only..........
    I just want to check my qwt ...
    please help me..

  2. #2
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt problem

    can you compile the examples delivered with qwt?

  3. #3
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: qwt problem

    As FelixB says, compiling the examples is the best test.

    However, by creating "plot" on the heap and using setSamples() in lieu of setRawSamples() your code works for me (Qwt 6.0.0-rc3):
    Qt Code:
    1. void MainWindow::on_pushButton_clicked()
    2. {
    3. double xval[5]={10,20,30,40.4,50};
    4. double yval[5]={1,2.2,3,4,5};
    5. QwtPlot *plot = new QwtPlot(QwtText("CppQwtExample1"));
    6. // plot->setTitle("first plot");
    7. plot->setTitle("first_plot");
    8. plot->setAxisTitle(QwtPlot::xBottom, " System time [h:m:s]");
    9. plot->setAxisScale(QwtPlot::xBottom, 0,60 );
    10. plot->setAxisTitle(QwtPlot::yLeft, "Degree");
    11. plot->setAxisScale(QwtPlot::yLeft, -60,60 );
    12. plot->setAutoReplot(true); // not needed
    13. QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
    14. curve1->setPen(QPen(Qt::blue));
    15. curve1->setSamples(xval,yval,5);
    16. curve1->attach(plot);
    17. plot->replot(); // not needed
    18. plot->show();
    19. }
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    May 2011
    Posts
    39
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt problem

    please provide me some examples..........and .pro file if you can........
    that would be very helpful for me..
    I am not been able to start
    I am stuck here in my project.....
    your help shall be highly appreciated...

  5. #5
    Join Date
    Jun 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt problem

    C:\Qt\2010.05\qwt-build-desktop\debug\qwt.exe exited with code -1073741511
    We can get a lot more information if you actually use the debugger to find your errors. A problem like the above with -no other data- occurs 99% of the time without a debugger.

  6. #6
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt problem

    Quote Originally Posted by robotics View Post
    please provide me some examples..........and .pro file if you can........
    that would be very helpful for me..
    you downloaded the qwt sources, didn't you? then you already have examples. these are in a directory called "examples" (surprisingly, isn't it?) in your qwt directory...

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
  •  
Qt is a trademark of The Qt Company.