Custom3DLabel QML Type

为图表添加自定义标签。更多

Import Statement: import QtDataVisualization 1.9
Since: QtDataVisualization 1.1
In C++: QCustom3DLabel
Inherits:

Custom3DItem

属性

详细说明

可以设置自定义标签的文本、字体、位置、缩放、旋转和颜色。此外,还可以切换标签边框和背景的可见性。除非明确设置,否则颜色、边框和背景由活动主题决定。

注意: 在缩放时,z 坐标不起作用。设置相同的 x 坐标和 y 坐标可保持字体的原始尺寸。

属性文档

backgroundColor : color

标签背景颜色(如果启用)。默认为"gray"

另请参阅 backgroundEnabled


backgroundEnabled : bool

定义是否启用标签背景。如果设置为false ,则backgroundColor 无效。默认为true


borderEnabled : bool

定义是否启用标签边框。默认为true


facingCamera : bool

定义标签是否始终面向摄像头。默认设置为false 。如果设置为true ,则rotation 无效。


font : font

标签使用的字体。默认为Font {family: "Arial"; pointSize: 20} 。不支持特殊格式(如轮廓)。


text : string

标签文本。不支持富文本。


textColor : color

标签文本的颜色。如果启用,也会影响标签边框。默认为"white"

另请参阅 borderEnabled


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