このページでは

XrVirtualMouse QML Type

3Dコントローラ入力を2Dアイテムのマウス入力にマップする。詳細...

Import Statement: import QtQuick3D.Xr
Since: Qt 6.8
Inherits:

Item

プロパティ

詳しい説明

XrVirtualMouseは、3Dシーンで2Dユーザー・インターフェースとインタラクションする方法を提供します。

通常、このように使用します:

// XrView { id: xrView
// XrController { id: rightController
XrInputAction {
    id: rightTrigger
    hand: XrInputAction.RightHand
    actionId: [XrInputAction.TriggerPressed, XrInputAction.TriggerValue]
}
XrVirtualMouse {
    view: xrView
    source: rightController
    leftMouseButton: rightTrigger.pressed
}

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

enabled : bool

仮想マウスが有効かどうかを示す。trueの場合、仮想マウスはシーン内の2Dオブジェクトにマウスイベントを送信する。

leftMouseButton : bool

マウスの左ボタンの状態を設定します。

trueに設定すると、マウスの左ボタンが押された状態になります。

middleMouseButton : bool

マウスの中ボタンの状態を設定します。

trueを指定すると、マウスの中ボタンが押された状態になります。

rightMouseButton : bool

マウスの右ボタンの状態を設定します。

trueを指定すると、マウスの右ボタンが押された状態になります。

scrollPixelDelta : real [default: 15]

各スクロールイベントでスクロールされる基本距離を定義する。

これはスクロール速度が1のときにスクロールされる距離である。

scrollWheelX およびscrollWheelYも参照してください

scrollTimerInterval : int [default: 30]

システムに送られるスクロールイベント間の時間をミリ秒単位で定義する。

scrollWheelX : real

水平スクロールの速度を設定する。

正の値は右に、負の値は左にスクロールする。スクロール速度はゼロからの距離に対して相対的に増加する。

scrollPixelDeltaも参照

scrollWheelY : real

垂直方向のスクロール速度を設定します。

正の値は上に、負の値は下にスクロールする。スクロール速度はゼロからの距離に対して相対的に増加する。

scrollPixelDeltaも参照

source : Node

仮想マウスを制御する 3D ノード。

通常、source プロパティは、XrController に設定されます。マウスイベントは、source ノードのforward vector が 2D アイテムと交差する位置に対して生成されます。

view : XrView

仮想マウスに関連付けられた XR ビュー。仮想マウスが操作するビューを保持します。

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