Hello, I have created a label for a QwtPlotMarker. The vertical line is near the right edge of the plot and is truncated by the right edge of the plot/canvas.

Attenuation-Dialog.JPG

How can I make the plot take into account the label and make the plot a bit bigger? Struggling along I tried this:
m_wa_marker->setItemAttribute(QwtPlotItem::Margins, true); // more space???

Thanks in advance for your suggestions (btw - great library!)

cs

Qt Code:
  1. QwtPlotMarker *m_wa_marker;
  2. void emat_attenuation_plot::set_wa_sample(double sample)
  3. {
  4. QString label = QString("WA: %1").arg(sample, 0, 'f', 1);
  5. QwtText text(label);
  6. text.setColor(Qt::blue);
  7. text.setFont(QFont("Helvetica", 10, QFont::Bold));
  8. m_wa_marker->setLabel(text);
  9. m_wa_marker->setValue(sample, 0.0);
  10. m_wa_marker->setItemAttribute(QwtPlotItem::Margins, true); // more space???
  11. }
To copy to clipboard, switch view to plain text mode