Hello Team,
I have few questions related to QCustomPlot-
1)Can we add QGraphicsItem on QCustomPlot?
2) QCPItemRect *rect1= new QCPItemRect(ui->customPlot);
ui->customPlot->addItem(rect); //Here I am not able to find addItem to add the QCPItemRect on QCustomPlot, Compiler gives
error, Its not a member of CustomPlot. I am able to draw Rect but not able to add Rect Item on
QcustomPlot so its not movable and not selectable...Please anybody having any information about this issue how we can fixed please let me know..Thanks in advance.
rect1->setSelectable(true);
rect1->setPen(QPen(QColor(50, 0, 0, 100)));
rect1->setSelectedPen(QPen(QColor(0, 255, 0, 100)));
rect1->setBrush(QBrush(QColor(50, 0, 0, 100)));
rect1->setSelectedBrush(QBrush(QColor(0, 255, 0, 100)));
rect1->topLeft->setCoords(60,45);
rect1->bottomRight->setCoords(100,-45);
Thanks