Button {
            id: btn
            text: "Tip"
            anchors.horizontalCenter: parent.horizontalCenter

//            ToolTip.timeout: 5000
//            ToolTip.visible: pressed
//            ToolTip.text: "This is a tool tip."

            ToolTip {
                id: control
                visible: btn.pressed
                ToolTip.timeout: 5000
                text: qsTr("A descriptive tool tip of what the button does")

                contentItem: Text {
                    text: control.text
                    font: control.font
                    color: "#21be2b"
                }

                background: Rectangle {
                    border.color: "#21be2b"
                }
            }

        }

相关文章:

  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2021-05-14
  • 2021-05-29
猜你喜欢
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案