sirop
2nd May 2015, 12:41
Hallo.
I have a simple line:
plot->labelRpPlot->setText((const QString &) "Rp [N]=20000.333 <br><br> Rp[N/mm <sup>2</sup>]=3.44455", QwtText::RichText);
but got errors:
..\AATORQUE_PLOTTIMER\mainwindow.cpp:767:135: error: no matching function for call to 'QwtPlotTextLabel::setText(const QString&, QwtText::TextFormat)'
plot->labelRpPlot->setText((const QString &) "Rp [N]=20000.333 <br><br> Rp[N/mm <sup>2</sup>]=3.44455",QwtText::RichText);
^
..\AATORQUE_PLOTTIMER\mainwindow.cpp:767:135: note: candidate is:
In file included from ..\AATORQUE_PLOTTIMER\myplot.h:16:0,
from ..\AATORQUE_PLOTTIMER\mainwindow.h:7,
from ..\AATORQUE_PLOTTIMER\mainwindow.cpp:22:
..\..\LIB\qwt-6.1.2\include/qwt_plot_textlabel.h:55:10: note: void QwtPlotTextLabel::setText(const QwtText&)
void setText( const QwtText & );
Why? The documentation for 6.1.2 does offer:
void QwtTextLabel::setText ( const QString & text,
QwtText::TextFormat textFormat = QwtText::AutoText
)
http://qwt.sourceforge.net/class_qwt_text_label.html#ab300b9a0a6392e180f2caff 41ba2b9b8
Thanks for all your answers in advance.
I have a simple line:
plot->labelRpPlot->setText((const QString &) "Rp [N]=20000.333 <br><br> Rp[N/mm <sup>2</sup>]=3.44455", QwtText::RichText);
but got errors:
..\AATORQUE_PLOTTIMER\mainwindow.cpp:767:135: error: no matching function for call to 'QwtPlotTextLabel::setText(const QString&, QwtText::TextFormat)'
plot->labelRpPlot->setText((const QString &) "Rp [N]=20000.333 <br><br> Rp[N/mm <sup>2</sup>]=3.44455",QwtText::RichText);
^
..\AATORQUE_PLOTTIMER\mainwindow.cpp:767:135: note: candidate is:
In file included from ..\AATORQUE_PLOTTIMER\myplot.h:16:0,
from ..\AATORQUE_PLOTTIMER\mainwindow.h:7,
from ..\AATORQUE_PLOTTIMER\mainwindow.cpp:22:
..\..\LIB\qwt-6.1.2\include/qwt_plot_textlabel.h:55:10: note: void QwtPlotTextLabel::setText(const QwtText&)
void setText( const QwtText & );
Why? The documentation for 6.1.2 does offer:
void QwtTextLabel::setText ( const QString & text,
QwtText::TextFormat textFormat = QwtText::AutoText
)
http://qwt.sourceforge.net/class_qwt_text_label.html#ab300b9a0a6392e180f2caff 41ba2b9b8
Thanks for all your answers in advance.