0
Follow
0
View

What is the QMessageBox::aboutQt equivalent in QML?

civilnainiu 注册会员
2023-01-25 22:43

The closest match of QMessageBox::about with QML would be MessageDialog setup like this:

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
}

As for QMessageBox::aboutQt, according to this topic, in the Qt forum, there is no QML equivalent and it is better to invoke qApp->aboutQt:

About the Author

Question Info

Publish Time
2023-01-25 22:43
Update Time
2023-01-25 22:43

Related Question

unique()方法在visual studio IDE中不起作用,得到执行错误

arcgis 栅格计算

OpenGraph标签不适用于我们在Discord上的网站链接

没有名为WhiteNoise的模块

发送消息到whatsapp群

Android 12蓝牙广播接收器ACL_CONNECTED和AC_DISCONNECTED问题

使用Luckysheet报错TypeError: file.match is not a function

visual studio 找不到 JDK 8,如何解决?

Mybatis 批量提交问题

我在做Prometheus Operator 配置报警,alertmanager收到消息 但是通过webhook方式发送消息 ,没有触发告警。