在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"));
......
请尝试一下,希望对您有所帮助,但老实说,我没有改变自己进行测试。