如何从QML内创建一个新窗口?
发布时间:2020-12-14 01:45:37 所属栏目:Windows 来源:网络整理
导读:有没有办法创建一个全新的窗口实例,作为QmlApplication中主QML窗口的子窗口? // ChildWindow.qmlRectangle { id: childWindow width: 100 height: 100 // stuff}// main.qmlRectangle { id: window width: 1000 height: 600 MouseArea { anchors.fill: pare
有没有办法创建一个全新的窗口实例,作为QmlApplication中主QML窗口的子窗口?
// ChildWindow.qml Rectangle { id: childWindow width: 100 height: 100 // stuff } // main.qml Rectangle { id: window width: 1000 height: 600 MouseArea { anchors.fill: parent onClicked: createAWindow(childWindow); } } 我正在尝试避免编写一个Q_OBJECT类,仅用于在新的QmlApplicationViewer中实现新窗口.
没有办法仅使用内置的QML功能来创建顶级窗口.
然而,有一个名为Desktop Components的Qt Labs项目,其中包含一个Window component,它允许您创建新的顶级窗口. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows2003服务器C盘的清理方法
- windows – 是否可以在防火墙后面安装一台机器并拥有公共IP
- winapi – Win32文件名比较
- Windows事件日志与文本日志
- ExtJs面板 – 添加动态组件
- 自动安装 – 使用Powershell和Hyper-V无人值守安装Windows
- windows-mobile – 使Windows Mobile设备模拟蓝牙HID设备
- Windows 7 、Windows Server 2008 和 Windows Server 2008
- windows-server-2003 – 您对Google Apps专业版的体验是什么
- MFC调用libyara遇到的问题
推荐文章
站长推荐
- winapi – 如何在Vista / Windows7中添加持久IPv
- 使用PowerShell管理Windows 2003 Active Directo
- 用于Windows Phone 7 / Silverlight的绘图库
- 当我在Windows上的Android Studio中克隆git存储库
- 你可以在Windows上运行和编译swift代码吗?
- .net – SendKeys.Send和Windows Key
- Windows下MySQL的主从复制
- 无法在Windows 10上的MySQL 8.x中设置lower_case
- windows – 检索当前域用户的全名
- 程序集 – MZ(DOS,16位).EXE标头中页面计数和最后
热点阅读