XrItem QML Type
2Dユーザーインターフェースのコンテンツを保持できる3D空間の仮想サーフェス。詳細...
Import Statement: | import QtQuick3D.Xr |
Since: | Qt 6.8 |
Inherits: | |
Status: | Technical Preview |
プロパティ
- automaticHeight : bool
- automaticWidth : bool
- color : color
- contentItem : Item
- height : real
- manualPixelsPerUnit : bool
- pixelsPerUnit : real
- width : real
詳細説明
XrItemタイプは、width とheight で長方形を表すQt Quick 3DNode です。contentItem で指定されたQt Quick Item を1つ保持し、フィットするようにスケーリングします。これにより、従来の2Dユーザー・インターフェースを、実世界の大きさを持つ仮想サーフェス上に表示する便利な方法が提供されます。
XrItemの他の子はNodeの子として扱われ、スケーリングされません。
例えば、次のコードは1メートル×1メートルの仮想サーフェスを作成し、600ピクセル×600ピクセルのコンテンツ・アイテムを表示します。ここでの効果は、コンテンツ アイテムを拡大縮小することによって達成されるものであり、コンテンツ アイテムをより高い解像度でレンダリングするものではないことに注意してください。
XrItem { width: 100 height: 100 contentItem: Rectangle { width: 600 height: 600 color: "red" } }
プロパティ・ドキュメンテーション
automaticHeight : bool |
trueに設定すると、XrItem 、heightプロパティで設定された高さは無視され、contentItem heightから計算された高さが使用されます。
automaticWidthも参照してください 。
automaticWidth : bool |
trueに設定されたときXrItem は、widthプロパティを通して設定されたwidthを無視し、contentItem widthから計算されたwidthを使用します。
automaticHeightも参照 。
contentItem : Item |
このプロパティは、仮想サーフェス上に表示されるコンテンツ項目を保持する。コンテンツアイテムのサイズは、単位あたりのピクセル値を計算するために使用され、このアイテムのサイズに基づいて拡大縮小される。
pixelsPerUnitも参照のこと 。
manualPixelsPerUnit : bool |
このプロパティがtrue
の場合、contentItems の 2D 座標系とこのXrItem の 3D 座標系の比率はpixelsPerUnit の値で定義される。 このプロパティがfalse
の場合、比率はコンテンツアイテムのサイズとXrItem のサイズに基づいて計算される。
pixelsPerUnitも参照のこと 。
pixelsPerUnit : real |
このプロパティは、contentItems の 2D 座標系のピクセル数が、XrItem の 3D 座標系の 1 単位に収まるかを決定する。デフ ォル ト では、 こ れは内容項目のサ イ ズ とXrItem のサ イ ズに基づいて計算 さ れます。
デフ ォル ト の動作を無効にして、 単位あ た り ピ ク セル数を手動で設定す る には、manualPixelsPerUnit を設定 し ます。
manualPixelsPerUnitも参照のこと 。
© 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.