本页内容

XrErrorDialog QML Type

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

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

Item

Status: Technology preview

此类型处于技术预览阶段,可能会有变更。

方法

  • void run(string title, string message)

详细说明

当您从台式计算机向XR头显流式传输内容时,可以使用此类型。它会在桌面屏幕上显示一个对话框,通常用于向用户报告初始化头显时出现的错误。在内部,它会动态实例化一个包含消息对话框的Window对象。

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.