RoundButton QML Type
一个带有圆角、用户可以点击的按钮控件。更多...
| Import Statement: | import QtQuick.Controls |
| Inherits: |
属性
- radius : real
详细说明

RoundButton 与Button 完全相同,唯一的区别在于它具有radius 属性,该属性允许直接对角进行圆角处理,而无需自定义background 。
RoundButton {
text: "\u2713" // Unicode Character 'CHECK MARK'
onClicked: textArea.readOnly = true
}另请参阅 《自定义 RoundButton和Button 控件》。
属性文档
radius : real
该属性用于指定按钮的半径。
若要创建一个略带圆角的近似正方形按钮,请使用较小的数值,例如3 。
若要创建完全圆形的按钮(默认样式),请使用等于按钮宽度或高度一半的数值,并将按钮的宽度和高度设置为相同。
要将此属性重置为默认值,请将其值设置为undefined 。
© 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.