OSDN Git Service

QmlDesigner.formEditor: adding context menu
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Mon, 27 Jun 2011 15:58:24 +0000 (17:58 +0200)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Mon, 27 Jun 2011 15:58:53 +0000 (17:58 +0200)
This adds a default context menu to any tool.

Change-Id: I6d7faf5e0b3a7bf131359d6ee3717135492ea5de
Reviewed-on: http://codereview.qt.nokia.com/792
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp

index 0d60e0a..568f7cb 100644 (file)
@@ -236,6 +236,7 @@ void AbstractFormEditorTool::mouseDoubleClickEvent(const QList<QGraphicsItem*> &
 
 void AbstractFormEditorTool::showContextMenu(QGraphicsSceneMouseEvent *event)
 {
+     view()->showContextMenu(event->screenPos(), event->scenePos().toPoint(), true);
 }
 
 }