qt - 如何在 QML 中将父窗口置于子窗口前面
问题描述
目前我有一个根/父 qml 窗口,它创建了一些子窗口。它工作得很好,但是我不能把父窗口放在子窗口的前面。它始终停留在子窗口的背景中。有没有办法改变这个?
父.qml
// parent.qml
Window {
visible: true
id: root
...
childComp = Qt.createComponent("child.qml")
childWindow = childComp.createObject(root)
childWindow.show()
}
以及对应的child.qml
// child.qml
Window {
id: childWindow
visible: true
...
}
解决方案
推荐阅读
- python - 推送到远程服务器时出现 Jupyter 实验室错误
- reporting - 如何在 BIRT 报告中将当月的最后一天作为结束日期?
- flutter - Flutter 需要内联事件处理程序,因为 BuildContext 是内联的?
- ios - 保存单个行值列表数据的最佳方法是什么?
- postgresql - 如何将 postgreSQL 连接到 C++
- android - 测试数据库时使用 mockito 测试失败
- javascript - SyntaxError:在 heroku 上托管 Discord 机器人时出现意外的令牌 '??='
- sass - 与本地相比,全球 SASS 架构如何适用于 7 合 1、5 合 1 等?
- php - 的意义是什么?在 POO 参数 PHP 中?
- python - 从 C# 关闭 Flask 应用程序?