QML 中的 QMessageBox::aboutQt 等价物是什么?

What is the QMessageBox::aboutQt equivalent in QML?

是否有可以在 QML 中使用的 QMessageBox::aboutQt 的等价物?我在 QtQuick.Dialogs 模块 (https://doc.qt.io/qt-5/qtquickdialogs-index.html) 中没有找到合适的内容。

QMessageBox::about 与 QML 最接近的匹配是 MessageDialog 这样的设置:

import QtQuick 2.2
import QtQuick.Dialogs 1.1

MessageDialog {
    title: "Your title"
    icon: StandardIcon.Information
    text: "Your text"
    standardButtons: StandardButton.Ok
    Component.onCompleted: visible = true
}

至于QMessageBox::aboutQt,根据this topic,在Qt论坛中,没有QML等价物,最好调用qApp->aboutQt:

reading the docs seems there's no aboutQt for QML.

probably better to invoke standard qApp->aboutQt from C++ class.