how to put a Pixmap in a qwtplot?
hello
I wonder how I can put a QPixmap in a QwtPlot, this can be done?
I just need to zoom to an area of ​​the QPixmap. And with the function of QwtPlot Zoomer is easy.
Quote:
QwtPlotZoomer* zoomer = new MyZoomer(canvas());
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier);
zoomer->setMousePattern(QwtEventPattern::MouseSelect3,
Qt::RightButton);
if not can I have another way to zoom to QPixmap?
thanks
Re: how to put a Pixmap in a qwtplot?
How is your pixmap related to plot coordinates ?
Uwe
1 Attachment(s)
Re: how to put a Pixmap in a qwtplot?
I do not understand your question.
I have a QPixmap that contains an image. is something like this
Attachment 8041
and I need to make zoom.
for this reason I put it in a QwtPlot, to use the function:
QwtPlotZoomer* zoomer = new MyZoomer(canvas());
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier);
zoomer->setMousePattern(QwtEventPattern::MouseSelect3,
Qt::RightButton);
Re: how to put a Pixmap in a qwtplot?
When the pixmap is unrelated to any plot coordinates QwtPlot is not the right solution.
Instead put your Pixmap on a QLabel. You can use a QwtPicker ( works with any type of widget ) if you want to use Qwt classes, but using a QRubberband should do it as well. The rest is about translating the selected rectangle into QPixmap/QImage operations.
Uwe