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’
{
public:
virtual void drawRubberBand
(QPainter *p
) const {
p->drawRect(myNewCursor); // error 1 here
}
};
class MainWindow
: public QMainWindow { // error 2 here etc.
}
class MyPicker: public QwtPlotPicker
{
public:
MyPicker():QwtPlotPicker() {};
virtual void drawRubberBand(QPainter *p) const
{
QRect myNewCursor = QRect(0,0,10,10);
p->drawRect(myNewCursor); // error 1 here
}
};
class MainWindow : public QMainWindow { // error 2 here
etc.
}
To copy to clipboard, switch view to plain text mode
Bookmarks