Hello,
I placed a legend within the plot area like this at initialisation:
// create legend
// set transparent background
lLegend
->setStyleSheet
(QString::fromUtf8("background-color: rgba(255, 255, 255, 0);"));
// set policy
lLegend->setFocusPolicy(Qt::NoFocus);
// add to plot
plot
()->insertLegend
(lLegend,
QwtPlot::ExternalLegend);
// create legend
QwtLegend* lLegend = new QwtLegend(plot()->canvas());
// set transparent background
lLegend->setStyleSheet(QString::fromUtf8("background-color: rgba(255, 255, 255, 0);"));
// set policy
lLegend->setDisplayPolicy(QwtLegend::NoIdentifier, QwtLegend::ReadOnlyItem);
lLegend->setFocusPolicy(Qt::NoFocus);
// add to plot
plot()->insertLegend(lLegend, QwtPlot::ExternalLegend);
To copy to clipboard, switch view to plain text mode
Then somewhere else I set the extent:
plot()->legend()->setGeometry(lGeometry);
plot()->legend()->setGeometry(lGeometry);
To copy to clipboard, switch view to plain text mode
In addition I have a plot picker with the implementation of widgetMouseDoubleClickEvent(QMouseEvent *pMouseEvent).
Now the legend widget blocks the double click event of the picker.
Any idea how to deal with that?
Best regards
Stefan
Bookmarks