Results 1 to 6 of 6

Thread: Problems with SetMajPen after upgrading QT to 4.8.4 and QWT6.1

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2011
    Posts
    30
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Problems with SetMajPen after upgrading QT to 4.8.4 and QWT6.1

    I just reinstalled OSX to the latest and upgraded QT(4.74->4.8.4) and QWT(6.01->6.1). After getting my project to compile I can finally run my code if I comment out a couple of qwt calls that I don't understand. Below is my code. I am getting the following compile errors

    /Users/KenS/QT_Projects/ep1/plot.cpp:127: error: 'setMajPen' was not declared in this scope
    /Users/KenS/QT_Projects/ep1/plot.cpp:128: error: 'setMinPen' was not declared in this scope

    I did not get these errors before the upgrade. Does anyone have an idea of what I am doing wrong or what I could have not configured correctly when I rebuilt my machine?

    Ken


    Qt Code:
    1. #include "plot.h"
    2. // include "friedberg2007.h"
    3. #include <qwt_plot_zoomer.h>
    4. #include <qwt_plot_panner.h>
    5. #include <qwt_plot_marker.h>
    6. #include <qwt_plot_grid.h>
    7. #include <qwt_plot_curve.h>
    8. #include <qwt_plot_intervalcurve.h>
    9. #include <qwt_legend.h>
    10. #include <qwt_interval_symbol.h>
    11. #include <qwt_symbol.h>
    12. #include <qwt_series_data.h>
    13. #include <qwt_text.h>
    14. #include <qwt_scale_draw.h>
    15. #include <qwt_plot_renderer.h>
    16. #include <qdatetime.h>
    17. #include <qfiledialog.h>
    18. #include <qimagewriter.h>
    19. #include <qprintdialog.h>
    20. #include <qfileinfo.h>
    21.  
    22. ...
    23. ...
    24. ...
    25.  
    26. class Grid: public QwtPlotGrid
    27. {
    28. public:
    29. Grid()
    30. {
    31. enableXMin( true );
    32. setMajPen( QPen( Qt::white, 0, Qt::DotLine ) );
    33. setMinPen( QPen( Qt::gray, 0 , Qt::DotLine ) );
    34. }
    35.  
    36.  
    37. virtual void updateScaleDiv( const QwtScaleDiv &xMap,
    38. const QwtScaleDiv &yMap )
    39. {
    40. QList<double> ticks[QwtScaleDiv::NTickTypes];
    41.  
    42. ticks[QwtScaleDiv::MajorTick] =
    43. xMap.ticks( QwtScaleDiv::MediumTick );
    44. ticks[QwtScaleDiv::MinorTick] =
    45. xMap.ticks( QwtScaleDiv::MinorTick );
    46.  
    47. QwtPlotGrid::updateScaleDiv(
    48. QwtScaleDiv( xMap.lowerBound(), xMap.upperBound(), ticks ),
    49. yMap );
    50. }
    51. };
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: Problems with SetMajPen after upgrading QT to 4.8.4 and QWT6.1

    Quote Originally Posted by KenJustKen View Post
    /Users/KenS/QT_Projects/ep1/plot.cpp:127: error: 'setMajPen' was not declared in this scope
    /Users/KenS/QT_Projects/ep1/plot.cpp:128: error: 'setMinPen' was not declared in this scope
    What about spending 5 seconds on reading the 6.1 class documentation of QwtPlotGrid ?

    Uwe

Similar Threads

  1. Replies: 3
    Last Post: 21st May 2012, 17:55
  2. qwt6.0.1 legend problem
    By alainstgt in forum Qwt
    Replies: 3
    Last Post: 29th March 2012, 18:52
  3. Problems when Upgrading to V4.7.2 from v4.4.3
    By richardander in forum Qt Programming
    Replies: 2
    Last Post: 22nd April 2011, 23:15
  4. Replies: 1
    Last Post: 18th June 2010, 15:34
  5. Problems upgrading Qt3->Qt4, pkgconfig not happy
    By EricFowler in forum Installation and Deployment
    Replies: 3
    Last Post: 6th April 2008, 23:07

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.