Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
arrow->setPen(pen);
arrow->setHead(QCPLLineEnding::esLineArrow);
arrow->setHead(QCPLLineEnding::esDisc);
in this situation i'm playing the program, i resize the window and i see an arrow on the plot with coordinates (0,0) and (1,1).
this is the code
I didnt use replot!
I didnt use start!
I didnt use end!
in addition, when i will understand what is the problem I'm asking what is the correct way to draw a line when i'm trying to draw above other graph.
normally if I'm using points it will be like:
QVector<double> x;
QVector<double> y;
ui->grid->graph(number)->setData(x,y);
ui->grid->graph(number)->replot();
but I cant do setData with a line and its not related to some graph so i can i Draw the line on a specefic graph??
–
–
QCPItemLine is drawn automatically without replot, if you want it not to be displayed you must use:
setVisible(False);
If you want it to be displayed use:
setVisible(True);
ui->grid->replot();
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.