如何使用 QT 平台原生界面在 QNX 上打开窗口组
How to joing window group on QNX using QT platform native interface?
在QQuickItem中,我得到了如下窗口组名:
QPlatformNativeInterface* interface = QCoreApplication::instance()->platformNativeInterface();
char* groupName = (char*) interface->nativeResourceForWindow( "windowGroup", window() );
我现在正试图弄清楚如何加入该窗口组。几乎没有任何文档在QT平台原生接口上。我通过谷歌搜索找到了以下内容:https://qt.gitorious.org/qt/qtbase/source/b08cc0ec6f096d0e6764486c81264c24a406bee1:src/plugins/platforms/qnx/qqnxwindow.cpp
At any point following the creation of the QQnxWindow object, an application can
change the window group it has joined. This is done by using the e
setWindowProperty function of the native interface to set the e qnxWindowGroup property
to the desired value, for example:
code
QQuickView *view = new QQuickView(parent);
view->create();
QGuiApplication::platformNativeInterface()->setWindowProperty(view->handle(), "qnxWindowGroup",
group);
所以我的问题是在这种情况下什么是"组",如果有人可以显示使用此界面截取的代码?
感谢您的回复!
这段代码是正确的,在QNX中你可以加入窗口组的不同进程创建的窗口。 在这种情况下,组是QVariant()
这是元示例:
#include <QGuiApplication>
#include "QtGui/5.3.1/QtGui/qpa/qplatformnativeinterface.h"
......
QQuickView *view = new QQuickView(parent);
view->create();
QGuiApplication::platformNativeInterface()->setWindowProperty(view->handle(), "qnxWindowGroup",QVariant("MyGroup"));
......
请尝试一下,希望对您有所帮助,但老实说,我没有改变自己进行测试。
相关文章:
- 如何在Qt窗口小部件中使用QStringView(或QStringRef)
- 问:如何使用C++中的按钮从窗口打开窗口
- SDL 窗口不会弹出
- 在createdialog创建的窗口中捕获用于编辑控件的OnMouseMove消息
- 如何在cpp文件之间切换窗口?在Qt中
- QuadTree只在窗口的右上角绘制
- VS Code "command":"make"与终端窗口中的命令行"make"不同
- 如何在C++中找到active directory中禁用和锁定的窗口帐户
- 处理闪烁窗口事件
- 如何通过按下第三个窗口中的按钮,将QString从一个窗口获取到另一个窗口
- C++win32 API创建多个类似视口的窗口
- SFML RenderWindow打开窗口需要很长时间
- 如何将不同的可执行文件合并到一个窗口框架中进行编码?像浏览器一样
- 获取 SFML 窗口的 HWND 和高可用性?
- 如何获取 GLFW 窗口 ID?
- GLEW/GLUT:调用init并创建一个窗口后,取消初始化并重新初始化?
- 用于窗口的 HID 终端
- SFML 文本未绘制在窗口上
- 如何为窗口截屏
- 如何使用 QT 平台原生界面在 QNX 上打开窗口组