Hello i am using qwt 5.2 and qt 4.6 versions.
1) I checked the itemeditor example and hence qwt_widget_overlay class does not exist in qwt 5.2 i copied it to my project and tried to compile it.
But when i compile it i get a linking error for the line "QMetaObject::invokeMethod" line. I think the method trying to be invoked does not exist in my qwt version, right? (QwtPlotCanvas::borderPath).
What can i do in this situation? Please help, i have written everything for moving label, only this left.
void QwtWidgetOverlay
::draw( QPainter *painter
) const {
if ( widget )
{
painter->setClipRect( parentWidget()->contentsRect() );
// something special for the plot canvas
widget, "borderPath", Qt::DirectConnection,
if (!clipPath.isEmpty())
{
painter->setClipPath( clipPath, Qt::IntersectClip );
}
}
drawOverlay( painter );
}
void QwtWidgetOverlay::draw( QPainter *painter ) const
{
QWidget *widget = const_cast< QWidget *>( parentWidget() );
if ( widget )
{
painter->setClipRect( parentWidget()->contentsRect() );
// something special for the plot canvas
QPainterPath clipPath;
( void )QMetaObject::invokeMethod(
widget, "borderPath", Qt::DirectConnection,
Q_RETURN_ARG( QPainterPath, clipPath ), Q_ARG( QRect, rect() ) );
if (!clipPath.isEmpty())
{
painter->setClipPath( clipPath, Qt::IntersectClip );
}
}
drawOverlay( painter );
}
To copy to clipboard, switch view to plain text mode
2) in the QwtWidgetOverlay class it calls "QwtPlotCanvas::invalidateBackingStore" method. Again this method does not exist in qwt 5.2. There is a method called "invalidateCache" in qwt 5.2.
Does it do the similar things? Can i use it?
Bookmarks