【发布时间】:2014-12-02 04:43:37
【问题描述】:
在 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);
所以我的问题是,在这种情况下,什么是“组”,是否有人可以显示使用此界面截取的代码?
感谢您的回复!
【问题讨论】:
-
请问您打算如何使用它?无论如何,创建的新窗口都将加入父窗口。如果您想将此窗口加入其他窗口 - 只需更改父窗口即可。