QGraphicsSceneMoveEvent Class

QGraphicsSceneMoveEvent 클래스는 그래픽 뷰 프레임워크에서 위젯 이동을 위한 이벤트를 제공합니다. 더 보기...

Header: #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.