QwtDial::drawScaleContents() is a hook to be overloaded, that allows the application code to draw whatever you want - the default implementation does nothing.
F.e.
{
...
virtual drawScaleContents
( QPainter *painter,
const QPointF ¢er,
double radius
) const override
{
rect.setSize( 0.5 * radius, 0.5 * radius );
rect.moveCenter( center );
painter->setPen( Qt::black );
painter->setBrush( Qt::red ):
painter->drawRect( rect );
}
};
class YourDial: public QwtDial
{
...
virtual drawScaleContents( QPainter *painter,
const QPointF ¢er, double radius ) const override
{
QRectF rect;
rect.setSize( 0.5 * radius, 0.5 * radius );
rect.moveCenter( center );
painter->setPen( Qt::black );
painter->setBrush( Qt::red ):
painter->drawRect( rect );
}
};
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks