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:
QwtPlotCurve myCurve;
To copy to clipboard, switch view to plain text mode
in the constructor then I do:
myCurve.attach (myPlot1)
myCurve.attach (myPlot1)
To copy to clipboard, switch view to plain text mode
then something like
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:
std:: vector <* QwtPlotCurve> mycurve;
std:: vector <* QwtPlotCurve> mycurve;
To copy to clipboard, switch view to plain text mode
then I do in the constructor:
int Nb=8;
int number=2;
for (int k = 0 k <number; + + k)
{
mycurve [1 + k * Nb] -> attached (myPlot1);
mycurve
[1 + k
* Nb
] -> setPen
(QPen (Qt
:: blue,
4));
}
int Nb=8;
int number=2;
for (int k = 0 k <number; + + k)
{
mycurve.push_back (new QwtPlotCurve ());
mycurve [1 + k * Nb] -> attached (myPlot1);
mycurve [1 + k * Nb] -> setStyle (QwtPlotCurve:: Dots)
mycurve [1 + k * Nb] -> setPen (QPen (Qt:: blue, 4));
}
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 ?
Bookmarks