Is it possible to change the appearance of the mouse cursor inside QwtPlotPicker from the large cross symbol to something else?
Printable View
Is it possible to change the appearance of the mouse cursor inside QwtPlotPicker from the large cross symbol to something else?
I don't think you can do it on the Picker, but you can on Canvas: QwtPlotCanvas::setCursor(Qt::ForbiddenCursor);
You can even specify your own custom cursor if you want.
http://doc.qt.nokia.com/stable/qcursor.html
Hi Spitfire & Uwe,
Thanks for your replies.
@Uwe, how does one go about overloading the drawRubberBand? I've so far defined a customized Picker function with the following (i.e. if I wanted to change the "+" cursor into a rectangle)? The following doesn't compile, btw :(. I get errors for
error 1: invalid use of incomplete type ‘struct QPainter’
error 2: forward declaration of ‘struct QPainter’
Code:
{ public: { p->drawRect(myNewCursor); // error 1 here } }; etc. }
addCode:
#include <QPainter>
Now it compiles! Thanks!
But this doesn't replace the little white "+"-symbol? Is this really part of the rubber band?
No this is the cursor:
See http://doc.trolltech.com/4.7/qwidget.html#cursor-propCode:
plot()->canvas()->setCursor( ... );
Uwe