公告
财富商城
积分规则
提问
发文
2019-07-24 03:11发布
聊天终结者
The default button is "Yes", but I want to set the button "No" as the default button.
How to do it?
I don't see any way to achieve this through the current MessageDialog API, but I'd also imagine that this is very much platform-specific, and that's why it's hidden.
MessageDialog
You can make your own dialog, though:
import QtQuick 2.3 import QtQuick.Window 2.0 import QtQuick.Controls 1.2 import QtQuick.Dialogs 1.2 Window { width: 500 height: 500 visible: true Dialog { id: dialog visible: true contentItem: FocusScope { Row { anchors.bottom: parent.bottom anchors.right: parent.right Button { text: "No" isDefault: true focus: true onClicked: dialog.close() } Button { text: "Yes" } } } } }
最多设置5个标签!
I don't see any way to achieve this through the current
MessageDialog
API, but I'd also imagine that this is very much platform-specific, and that's why it's hidden.You can make your own dialog, though: