Well, the first step is to test your legend with a symbol in XCross style, that doesn't cover all space below its bounding rectangle. If the line is visible now we know that both are really painted.
One possible solution to solve your problem is to increase the width for the identifier, so you can see the line in the additional space. This can be done somehow this way:
{
public:
...
virtual void updateLegend
( QwtLegend *legend
) const {
qobject_cast<QwtLegendItem *>( legend->find( this ) );
if ( legendItem )
{
QSize sz
= symbol
()->boundingSize
();
legendItem->setIdentifierSize(
QSize( 3 * sz.
width(), sz.
height() ) );
}
}
};
class YourCurve: public QwtPlotCurve
{
public:
...
virtual void updateLegend( QwtLegend *legend ) const
{
QwtLegendItem *legendItem =
qobject_cast<QwtLegendItem *>( legend->find( this ) );
if ( legendItem )
{
QSize sz = symbol()->boundingSize();
legendItem->setIdentifierSize(
QSize( 3 * sz.width(), sz.height() ) );
}
QwtPlotItem::updateLegend( legend );
}
};
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks