本页内容

TabButton QML Type

一款外观适合TabBar 的按钮。更多...

Import Statement: import QtQuick.Controls
Inherits:

AbstractButton

详细说明

标签栏中的“标签”按钮

TabButton需与TabBar 配合使用。

TabBar {
    TabButton {
        text: qsTr("Home")
    }
    TabButton {
        text: qsTr("Discover")
    }
    TabButton {
        text: qsTr("Activity")
    }
}

TabButton 继承了AbstractButton 的 API。例如,您可以设置text ,并使用AbstractButton API 响应clicks 。

另请参阅 TabBar中的“自定义 TabButton”、“Button 控件”和“导航控件”。

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