RoundButton QML Type

用户可点击的圆角按钮控件。更多

Import Statement: import QtQuick.Controls
Inherits:

Button

属性

详细说明

RoundButton 与Button 相同,不同之处在于它有一个radius 属性,该属性允许在无需自定义背景的情况下对边角进行圆角处理。

RoundButton {
    text: "\u2713" // Unicode Character 'CHECK MARK'
    onClicked: textArea.readOnly = true
}

另请参阅 自定义 RoundButton按钮控件

属性文档

radius : real

该属性表示按钮的半径。

若要创建一个边角略呈圆形的相对方形按钮,请使用一个较小的值,如3

要创建完全圆形的按钮(默认值),请使用等于按钮宽度或高度一半的值,并使按钮的宽度和高度相同。

要将此属性重置为默认值,请将其值设置为undefined


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