PDA

View Full Version : "QwtPlotDict::attachItem() " error



rambo83
16th December 2009, 14:02
Hello,

I get the following error in debug mode
No source available for "QwtPlotDict::attachItem() "

Can you explain to me what is the reason for this?

The code part which causes this error is below:

if(i > (list_of_markers.size() - 1)){ // if the size of plotted markers is less than the size of population, then create and plot further markers

// create PlotMarkers to visualize the individuals
QwtPlotMarker *mark = new QwtPlotMarker();
QwtSymbol *symb = new QwtSymbol();
symb->setBrush(QBrush(Qt::red, Qt::SolidPattern)); // red, solid color
symb->setStyle(QwtSymbol::Ellipse); // it will be a circle
symb->setSize(5,5);
mark->setSymbol(*symb);
mark->setXValue(xCoord); // set the position of marker on the plot
mark->setYValue(yCoord);
char idx[5];
sprintf(idx,"%d", i);
mark->setTitle(idx); // set title to the marker, which afterwards helps to indicate the certain individual
//mark->setLabel(QwtText(idx));
mark->attach(d_plot); // <<<<<<<<<< HERE occurs the error!!!

// insert the new created marker into the marker list
list_of_markers.push_back(mark);

count_of_drawn++;
}