Update QwtPlot after create the plot object...
I've got my own plot class CDataPlot
Code:
{
Q_OBJECT
public:
virtual ~CDataPlot();
void SetPlotConfiguration(const QString& title = "", const QString& curvetitle="",
const QString& xtitle = "", const QString& ytitle = "",
double xlen = 0.0, double ylen = 0.0);
};
In the constructor
Code:
{
setupQWTUi();
this->SetPlotConfiguration("This can !");
// I can update the title of the plot here. For sure, this is just the constructor of the plot !!!!
}
Then, I've got another class CObjectDetectionPlots
Code:
// Object detection figures
{
Q_OBJECT
public:
CObjectDetectionPlots
(QWidget *parent
= 0, Qt
::WFlags flags
= 0);
~CObjectDetectionPlots();
CDataPlot* m_pDataPlot;
};
In the constructor
Code:
CObjectDetectionPlots
::CObjectDetectionPlots(QWidget *parent, Qt
::WFlags flags
){
// private ui
m_pDataPlot = new CDataPlot(this);
m_pDataPlot->SetPlotConfiguration("Can the title be updated?"); // no updating at all !!!
m_pDataPlot->replot(); // even if replot(), no use!!!!
ui.setupUi(this);
}
I just want to update the title of CDataPlot* m_pDataPlot; after having created the plot. Can I?
If so, how to do it?
As you can see, if I updated the title from within plot's constructor, I can get it done.
However, if I try to update the plot's title from outside, no updating at all !!!!!!!!!
Even if I use replot(), no use at all!!!
Please can anybody help to explain and give me a solution how will QWT update the plot after a plot object has been created??
Best Regards
JIA
Re: Update QwtPlot after create the plot object...
You just need to call QwtPlot::setTitle?