propagate cursor changes to the native widget

svn path=/trunk/KDE/kdelibs/; revision=1111916
This commit is contained in:
Aaron J. Seigo 2010-04-07 01:44:56 +00:00
parent d388ecebcb
commit 5ed9e14f0e
2 changed files with 10 additions and 0 deletions

View File

@ -348,6 +348,15 @@ bool Label::event(QEvent *event)
return QGraphicsProxyWidget::event(event);
}
QVariant Label::itemChange(GraphicsItemChange change, const QVariant & value)
{
if (change == QGraphicsItem::ItemCursorHasChanged) {
nativeWidget()->setCursor(cursor());
}
return QGraphicsWidget::itemChange(change, value);
}
} // namespace Plasma
#include <label.moc>

View File

@ -169,6 +169,7 @@ protected:
QWidget *widget);
void changeEvent(QEvent *event);
bool event(QEvent *event);
QVariant itemChange(GraphicsItemChange change, const QVariant & value);
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
private: