Results 1 to 3 of 3

Thread: cannot access any QwtPlotCurve instanz

  1. #1
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default cannot access any QwtPlotCurve instanz

    I always get the following error
    1>QCurvePlot.cpp
    1>e:\Daten\Dev\SVN\Laserdynamics\QLaserDynamic\inc lude\qwt\qwt_plot_curve.h(214) : error C2248: "QwtPlotItem::QwtPlotItem": Kein Zugriff auf private Member, dessen Deklaration in der QwtPlotItem-Klasse erfolgte.
    1> e:\daten\dev\svn\laserdynamics\qlaserdynamic\inclu de\qwt\qwt_plot_item.h(130): Siehe Deklaration von 'QwtPlotItem::QwtPlotItem'
    1> e:\daten\dev\svn\laserdynamics\qlaserdynamic\inclu de\qwt\qwt_plot_item.h(31): Siehe Deklaration von 'QwtPlotItem'
    1> Diese Diagnose trat in der vom Compiler generierten Funktion "QwtPlotCurve::QwtPlotCurve(const QwtPlotCurve &)" auf.
    If I access/create an new curve using:
    Qt Code:
    1. public:
    2. vector<QwtPlotCurve> Curve;
    3.  
    4. void QCurvePlot::addCurve()
    5. {
    6. QwtPlotCurve curve;
    7. Curve.push_back(curve);
    8. }
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: cannot access any QwtPlotCurve instanz

    Please don't crosspost.

    Uwe

  3. #3
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cannot access any QwtPlotCurve instanz

    Since this is a crosspost (I know one should not...) here the answer from the mailinglist of qwt from Rainer Thaden:
    Look at the bottom of
    http://qwt.sourceforge.net/qwt__plot...8h-source.html
    You'll find

    private:
    // Disabled copy constructor and operator=
    QwtPlotItem( const QwtPlotItem & );
    QwtPlotItem &operator=( const QwtPlotItem & );



    QwtPlotItem is a base class of QwtPlotCurve and doesn't allow to be copied.
    Your vector uses copies of the curve. So, you could store pointers of
    QwtPlotCurves inside your vector.

    vector<QwtPlotCurve*> Curve;
    Matthias

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.