知识点:

自定义按钮:

import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4

Window {
    id: root
    visible: true
    title: qsTr("Hello World")
    width: 800
    height: 600

    Button {
        id:btn
        x: 0
        y: 62
        text: "Quit2"
        style:ButtonStyle {
            background: Rectangle {
                implicitWidth: 100
                implicitHeight: 25
                border.width: btn.pressed ? 2 : 1
            }
        }
    }

}
main.qml

相关文章:

  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-01-05
  • 2021-10-30
  • 2021-11-04
  • 2022-01-12
猜你喜欢
  • 2021-09-16
  • 2021-11-02
  • 2021-05-29
  • 2021-11-21
  • 2022-03-01
相关资源
相似解决方案