Your draw methods are not overriding - they have a QRect while QwtPlotItem::draw has a QRectF in the signature.
Using the C++11 override keyword would have told you.
HTH,
Uwe
Your draw methods are not overriding - they have a QRect while QwtPlotItem::draw has a QRectF in the signature.
Using the C++11 override keyword would have told you.
HTH,
Uwe
olredi (9th April 2021)
Thanks a lot. That solves my problem.
Did not see anything regarding override.Using the C++11 override keyword would have told you.
Thanks,
olredi
"override" is a new keyword starting in C++11. You place it at the end of the declaration of a virtual class method that you are overriding. If you make a mistake in the declaration (QRect instead of QRectF for example) the compiler will issue an error because the signature is wrong.Did not see anything regarding override.
would cause a compile error with Qwt 6.Qt Code:
void draw(QPainter *painter, const QwtScaleMap &, const QwtScaleMap &, const QRect &rect) const override;To copy to clipboard, switch view to plain text mode
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
olredi (9th April 2021)
Bookmarks