Results 1 to 5 of 5

Thread: QwtPlotCurve : Windows shows curve, Linux curve is missing

  1. #1
    Join Date
    Feb 2010
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QwtPlotCurve : Windows shows curve, Linux curve is missing

    I have a main window and in that main window is a qwidget which I promoted to my class based on qwtplot. In the constructor of that class I have defined two arrays which were then added to my plotcurve. When running in Fedora Core 12 the plot comes up fine but missing the plot curve. When I run the same program in Windows 7 all is well with a plot containing the curve. Qt version is 4.6.2 on both platforms with qwt5.1.2 which I subversioned over and built on both machines. My constructor which does all of the work is below... Thanks very much for any insight into what I might be lacking here.

    Qt Code:
    1. #include "myplot.h"
    2. #include <qwt_symbol.h>
    3.  
    4. MyPlot::MyPlot(QWidget *gv) : QwtPlot ( gv)
    5. {
    6.  
    7. int i ;
    8.  
    9. setTitle ("junk") ;
    10. QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
    11. curve1->attach(this);
    12. // alloc memory for data arrays
    13. xdata = new double [100] ;
    14. ydata = new double [100] ;
    15.  
    16. // load arrays for display
    17. for (i = 0; i < 100; i++)
    18. {
    19. xdata[i] = i ;
    20. ydata[i] = i ;
    21. }
    22.  
    23. curve1->setData(xdata, ydata, 100);
    24. curve1->setPen(QPen(Qt::red, 3));
    25. curve1->setStyle (QwtPlotCurve::Lines) ;
    26.  
    27.  
    28. replot() ;
    29.  
    30. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Feb 2010
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QwtPlotCurve : Windows shows curve, Linux curve is missing

    Anybody have any thoughts on this? I would still like to use Qwt as I do in my Windows projects but I am still unable to get a curve in my linux based qwt programs
    thanks

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

    Default Re: QwtPlotCurve : Windows shows curve, Linux curve is missing

    The code snippet is ok - obviously this is not the code you have compiled or your problem is somewhere else.

    Uwe

  4. #4
    Join Date
    Feb 2010
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QwtPlotCurve : Windows shows curve, Linux curve is missing

    I am leaning that the problem is somewhere else, if you have the time, I have tarred up the cpp, header, .pro and makefile into the attachment to this message. Thanks
    Attached Files Attached Files

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

    Default Re: QwtPlotCurve : Windows shows curve, Linux curve is missing

    Attach a compilable tarball if you want someone to look at it.

    Uwe

Similar Threads

  1. Replies: 1
    Last Post: 22nd January 2010, 15:34
  2. Get a smooth curve
    By beekeep in forum Qwt
    Replies: 2
    Last Post: 7th January 2010, 18:49
  3. Replies: 1
    Last Post: 9th December 2009, 18:14
  4. simple % curve diagram.
    By janEUcitzen in forum Qwt
    Replies: 3
    Last Post: 27th March 2009, 09:16
  5. Want to draw Curve
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 12th September 2008, 08:14

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.