Overloading drawTracker is the correct idea. Start with this code:
void YourPicker
::drawTracker( QPainter *painter
) const {
const QRect textRect
= trackerRect
( painter
->font
() );
if ( !textRect.isEmpty() )
{
QwtText label
= trackerText
( trackerPosition
() );
if ( !label.isEmpty() )
label.draw( painter, textRect );
}
}
void YourPicker::drawTracker( QPainter *painter ) const
{
const QRect textRect = trackerRect( painter->font() );
if ( !textRect.isEmpty() )
{
QwtText label = trackerText( trackerPosition() );
if ( !label.isEmpty() )
label.draw( painter, textRect );
}
}
To copy to clipboard, switch view to plain text mode
Uwe
PS: QwtPicker::trackerRect is changed to virtual in SVN trunk
Bookmarks