在本页

XrErrorDialog QML Type

用于 PCVR 应用程序的自定义错误对话框。更多

Import Statement: import QtQuick3D.Xr
Since: Qt 6.8
Inherits:

Item

方法

  • void run(string title, string message)

详细说明

将内容从台式电脑串流到 XR 耳麦时可以使用这种类型。它在桌面屏幕上显示一个对话框,通常用于通知用户耳麦初始化过程中出现的错误。在内部,它会动态实例化一个带有消息对话框的窗口。

XrView {
    id: xrView

    XrErrorDialog {
        id: errorDialog
    }
    onInitializeFailed: (errorString) => errorDialog.run("XRView", errorString)
}

方法文档

void run(string title, string message)

显示错误对话框,标题为title ,信息内容为message

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.