Qt消息提醒框

MessageDialog

MessageDialog可以在用户操作时,给出一个提示性信息。相关的使用示例如下:

MessageDialog{
        title:                                      "Message Dialog"
        icon:                                       StandardIcon.Information
        text:                                       "This is a message dialog demo."
        detailedText:                               "This use for show dialog or hide dialog."
        standardButtons:                            StandardButton.Yes | StandardButton.Cancel
        Component.onCompleted:                      visible = true

        onYes: {
                console.log("Yes is choosed.")
        }

        onRejected: {
                console.log("Cancel button is clicked.")
        }
    }

猜你喜欢

转载自blog.csdn.net/iee2285/article/details/79412102