【发布时间】:2013-03-04 04:03:31
【问题描述】:
在对Get HWND on windows with Qt5 (from WId) 的回答之一中,建议使用QPlatformNativeInterface 来恢复本机窗口处理程序。
要访问 QT 标头,尽管该示例使用其完整路径:
#include <QtGui/5.0.0/QtGui/qpa/qplatformnativeinterface.h>
当然,这不能作为最终解决方案来接受。 有没有办法使用 QT 的默认包含系统来包含 QPlatformNativeInterface?
请注意,两者都没有
#include <QPlatformNativeInterface>
有效(在默认 QT 构建期间不会生成此文件)
也没有
#include <QGuiApplication>
works(仅包含 QPlatformNativeInterface 的前向声明)
【问题讨论】: