Hi,
i overloaded the method QwtPlotItem::updateLegend() to change the line width of my legend. The code is really simple and looks like:
QwtLegendItem *legendItem
= qobject_cast<QwtLegendItem
*>
(legend
->find
(this));
if (legendItem) {
//Set the width for the legend identifier to 24 pixels. Default is 8 pixels
legendItem->setIdentiï¬erWidth(24);
}
QwtLegendItem *legendItem = qobject_cast<QwtLegendItem*>(legend->find(this));
if (legendItem) {
//Set the width for the legend identifier to 24 pixels. Default is 8 pixels
legendItem->setIdentiï¬erWidth(24);
}
To copy to clipboard, switch view to plain text mode
I'm using Qt 4.7.2 with Qwt 5.2.1. MS Visual Studio always output the following error: error C2039: 'setIdentiï¬erWidth' : is not a member of 'QwtLegendItem'
Am i doing something wrong or is it the reason why this method was replaced by void QwtLegendItem::setIdentifierSize(const QSize &size) in Qwt 6.x?
Thx,
Yann
Bookmarks