Results 1 to 5 of 5

Thread: qwtcurve vector

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    122
    Thanks
    34
    Platforms
    Windows

    Default qwtcurve vector

    Hello all,

    I have a new little trouble with QWT
    usually when I want to make a curve i do this:

    I put an attribute like this:
    Qt Code:
    1. QwtPlotCurve myCurve;
    To copy to clipboard, switch view to plain text mode 

    in the constructor then I do:
    Qt Code:
    1. myCurve.attach (myPlot1)
    To copy to clipboard, switch view to plain text mode 

    then something like
    Qt Code:
    1. myCurve.setStyle (QwtPlotCurve:: Dots)
    To copy to clipboard, switch view to plain text mode 

    now I wish have a vector of curve and do the same thing

    I have done in the attributes:
    Qt Code:
    1. std:: vector <* QwtPlotCurve> mycurve;
    To copy to clipboard, switch view to plain text mode 

    then I do in the constructor:
    Qt Code:
    1. int Nb=8;
    2. int number=2;
    3. for (int k = 0 k <number; + + k)
    4. {
    5. mycurve.push_back (new QwtPlotCurve ());
    6. mycurve [1 + k * Nb] -> attached (myPlot1);
    7. mycurve [1 + k * Nb] -> setStyle (QwtPlotCurve:: Dots)
    8. mycurve [1 + k * Nb] -> setPen (QPen (Qt:: blue, 4));
    9. }
    To copy to clipboard, switch view to plain text mode 

    the problem is that I get an error:

    mycurve Have No member "attached"

    it's weird because in the first case it works with a curve too here it's just a vector of curve ?

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qwtcurve vector

    In first case you use attach(), not attached()

  3. The following user says thank you to stampede for this useful post:

    21did21 (17th June 2011)

Similar Threads

  1. QwtCurve faster repaint
    By baray98 in forum Qwt
    Replies: 2
    Last Post: 21st May 2010, 06:43
  2. vector of vector and computes
    By mickey in forum General Programming
    Replies: 1
    Last Post: 15th May 2008, 12:47
  3. std::vector
    By ToddAtWSU in forum General Programming
    Replies: 1
    Last Post: 28th September 2007, 15:14
  4. insert in a vector of vector
    By mickey in forum General Programming
    Replies: 3
    Last Post: 6th March 2007, 08:45
  5. vector of vector size
    By mickey in forum General Programming
    Replies: 5
    Last Post: 13th February 2007, 15:59

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.