このページでは

QMouseEventTransition Class

QMouseEventTransition クラスは、マウスイベントの遷移機能を提供します。詳細...

ヘッダー: #include <QMouseEventTransition>
CMake: find_package(Qt6 REQUIRED COMPONENTS StateMachine)
target_link_libraries(mytarget PRIVATE Qt6::StateMachine)
qmake: QT += statemachine
継承元: QEventTransition

プロパティ

パブリック関数

QMouseEventTransition(QState *sourceState = nullptr)
QMouseEventTransition(QObject *object, QEvent::Type type, Qt::MouseButton button, QState *sourceState = nullptr)
virtual ~QMouseEventTransition()
QBindable<Qt::MouseButton> bindableButton()
QBindable<Qt::KeyboardModifiers> bindableModifierMask()
Qt::MouseButton button() const
QPainterPath hitTestPath() const
Qt::KeyboardModifiers modifierMask() const
void setButton(Qt::MouseButton button)
void setHitTestPath(const QPainterPath &path)
void setModifierMask(Qt::KeyboardModifiers modifierMask)

再実装された保護関数

virtual bool eventTest(QEvent *event) override
virtual void onTransition(QEvent *event) override

詳細な説明

QMouseEventTransition は、Qt State Machine フレームワークの一部です。

関連項目: QState::addTransition()。

プロパティのドキュメント

[bindable] button : Qt::MouseButton

注:この プロパティは、QProperty のバインディングに対応しています。

このプロパティには、このマウスイベントの遷移が関連付けられているボタンが格納されます

アクセス関数:

Qt::MouseButton button() const
void setButton(Qt::MouseButton button)

[bindable] modifierMask : Qt::KeyboardModifiers

注:この プロパティは、QProperty のバインディングに対応しています。

このプロパティには、このマウスイベント遷移がチェックするキーボード修飾子マスクが格納されます。

アクセス関数:

Qt::KeyboardModifiers modifierMask() const
void setModifierMask(Qt::KeyboardModifiers modifierMask)

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

QMouseEventTransition::QMouseEventTransition(QState *sourceState = nullptr)

指定されたsourceState を使用して、新しいマウスイベント遷移を構築します。

QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type, Qt::MouseButton button, QState *sourceState = nullptr)

指定されたtype のイベントに対して、指定されたobject に基づき、指定されたbutton およびsourceState を用いて、新しいマウスイベント遷移を構築します。

[virtual noexcept] QMouseEventTransition::~QMouseEventTransition()

このマウスイベントの遷移を破棄します。

Qt::MouseButton QMouseEventTransition::button() const

このマウスイベントの遷移がチェック対象とするボタンを返します。

注: プロパティ「button」のゲッター 関数です。

関連項目: setButton()。

[override virtual protected] bool QMouseEventTransition::eventTest(QEvent *event)

QEventTransition::eventTest(QEvent *event) の再実装です。

QPainterPath QMouseEventTransition::hitTestPath() const

このマウスイベント遷移のヒットテストパスを返します。

setHitTestPath()も参照してください 。

Qt::KeyboardModifiers QMouseEventTransition::modifierMask() const

このマウスイベントの遷移でチェックされるキーボード修飾子マスクを返します。

注: プロパティ modifierMask のゲッター 関数です。

関連項目: setModifierMask()。

[override virtual protected] void QMouseEventTransition::onTransition(QEvent *event)

QEventTransition::onTransition(QEvent *event) の再実装です。

void QMouseEventTransition::setButton(Qt::MouseButton button)

このマウスイベントの遷移でチェック対象とするbutton を設定します。

注: プロパティ `button`のセッター 関数です。

button()も参照してください 。

void QMouseEventTransition::setHitTestPath(const QPainterPath &path)

このマウスイベントのトランジションのヒットテストパスを `path` に設定します。有効なパスが設定されている場合、トランジションはマウスイベントの位置(`QMouseEvent::position()`)がそのパス内にある場合にのみトリガーされます。

hitTestPath() およびQPainterPath::contains()も参照してください 。

void QMouseEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask)

このマウスイベント遷移がチェックするキーボード修飾子マスクを `modifierMask` に設定します。

注: プロパティ `modifierMask`のセッター 関数です。

関連項目: modifierMask()。

© 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.