このページでは

QGraphicsSceneMoveEvent Class

QGraphicsSceneMoveEvent クラスは、グラフィックスビューフレームワークにおけるウィジェットの移動に関するイベントを提供します。詳細...

ヘッダー: #include <QGraphicsSceneMoveEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
継承元: QGraphicsSceneEvent

パブリック関数

QGraphicsSceneMoveEvent()
virtual ~QGraphicsSceneMoveEvent()
QPointF newPos() const
QPointF oldPos() const

詳細な説明

QGraphicsWidget は、自身のローカル位置が変化すると直ちに、自身に対してQGraphicsSceneMoveEventを送信します。この送信は、QGraphicsItem::itemChange()の一部として実装されています。

QMoveEvent と似ていますが、その positions、oldPos()、およびnewPos() では、QPoint の代わりにQPointF が使用されます。

QGraphicsItem::setPos()、QGraphicsItem::ItemPositionChange 、およびQGraphicsItem::ItemPositionHasChangedも参照してください 。

メンバー関数のドキュメント

QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()

QGraphicsSceneMoveEvent を作成します。

[virtual noexcept] QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()

QGraphicsSceneMoveEvent を削除します。

QPointF QGraphicsSceneMoveEvent::newPos() const

新しい位置(つまり、現在の位置)を返します。

oldPos() およびQGraphicsItem::setPos()も参照してください 。

QPointF QGraphicsSceneMoveEvent::oldPos() const

以前の位置(つまり、ウィジェットが移動される直前の位置)を返します。

newPos() およびQGraphicsItem::setPos()も参照してください 。

© 2026 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 the GNU 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.