Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QGraphicsSceneContextMenuEvent Class

TheQGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.More...

Header:#include <QGraphicsSceneContextMenuEvent>
Since: Qt 4.2
Inherits:QGraphicsSceneEvent

Public Types

enumReason { Mouse, Keyboard, Other }

Public Functions

~QGraphicsSceneContextMenuEvent()
Qt::KeyboardModifiersmodifiers() const
QPointFpos() const
Reasonreason() const
QPointFscenePos() const
QPointscreenPos() const

Additional Inherited Members

  • 1 property inherited fromQEvent
  • 1 static public member inherited fromQEvent

Detailed Description

TheQGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.

AQContextMenuEvent received by aQGraphicsView is translated into aQGraphicsSceneContextMenuEvent. TheQContextMenuEvent::globalPos() is translated into item, scene, and screen coordinates (pos(),scenePos(), andscreenPos()).

See alsoQGraphicsSceneMouseEvent,QGraphicsSceneWheelEvent, andQContextMenuEvent.

Member Type Documentation

enum QGraphicsSceneContextMenuEvent::Reason

This enum describes the reason why the context event was sent.

ConstantValueDescription
QGraphicsSceneContextMenuEvent::Mouse0The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked.
QGraphicsSceneContextMenuEvent::Keyboard1The keyboard caused this event to be sent. On Windows and Mac OS X, this means the menu button was pressed.
QGraphicsSceneContextMenuEvent::Other2The event was sent by some other means (i.e. not by the mouse or keyboard).

Member Function Documentation

QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent()

Destroys the event.

Qt::KeyboardModifiers QGraphicsSceneContextMenuEvent::modifiers() const

Returns the keyboard modifiers in use when the context menu was requested.

QPointF QGraphicsSceneContextMenuEvent::pos() const

Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.

See alsoscenePos() andscreenPos().

Reason QGraphicsSceneContextMenuEvent::reason() const

Returns the reason for the context menu event.

See alsoQGraphicsSceneContextMenuEvent::Reason.

QPointF QGraphicsSceneContextMenuEvent::scenePos() const

Returns the position of the mouse cursor in scene coordinates at the moment the the context menu was requested.

See alsopos() andscreenPos().

QPoint QGraphicsSceneContextMenuEvent::screenPos() const

Returns the position of the mouse cursor in screen coordinates at the moment the the context menu was requested.

See alsopos() andscenePos().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp