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 と似ていますが、その位置である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()も参照してください 。
© 2025 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.