Custom3DLabel QML Type

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

Import Statement: import QtGraphs
In C++: QCustom3DLabel
Inherits:

Custom3DItem

属性

信号

详细说明

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

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

属性文档

backgroundColor : color

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

另请参阅 backgroundVisible


backgroundVisible : bool

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


borderVisible : bool

定义标签边框是否可见。默认为true


facingCamera : bool

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


font : font

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


text : string

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


textColor : color

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

另请参阅 borderVisible


信号 文档

backgroundColorChanged(color color)

backgroundColor 更改为color 时,将发出该信号。

注: 相应的处理程序是onBackgroundColorChanged


backgroundEnabledChanged(bool enabled)

当 backgroundEnabled 更改为enabled 时发出此信号。

注: 相应的处理程序是onBackgroundEnabledChanged


borderEnabledChanged(bool enabled)

当 borderEnabled 更改为enabled 时,将发出此信号。

注: 相应的处理程序是onBorderEnabledChanged


facingCameraChanged(bool enabled)

facingCamera 更改为enabled 时,将发出此信号。

注: 相应的处理程序是onFacingCameraChanged


fontChanged(font font)

font 变更为font 时,发出该信号。

注: 相应的处理程序是onFontChanged


textChanged(string text)

text 变更为text 时,发出此信号。

注: 相应的处理程序是onTextChanged


textColorChanged(color color)

textColor 变更为color 时,发出此信号。

注: 相应的处理程序是onTextColorChanged


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