c++ - 如何将Window放入QWidget布局(Qt5)

标签 c++ qt qwidget qt5

我想在一些小部件布局中将 QQuickView 插入到我的旧 qt4 应用程序中。如何在单个应用程序中混合使用 QWidget 和 QWindow?

有例子吗?

最佳答案

这已在 Qt 5.1 中修复。引用 [1]

To remedy this problem, Qt 5.1 introduces the function QWidget::createWindowContainer(). A function that creates a QWidget wrapper for an existing QWindow, allowing it to live inside a QWidget-based application. Using QQuickView or QOpenGLContext together with widgets is now possible.

[1] https://www.qt.io/blog/2013/02/19/introducing-qwidgetcreatewindowcontainer

关于c++ - 如何将Window放入QWidget布局(Qt5),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13198367/

相关文章:

c++ - 在 OSX 上设置 CUTE(Eclipse CDT 单元测试插件)

c++ - 如何在目录中添加所有 .pri 文件

c++ - 什么是模板演绎指南,我们应该在什么时候使用它们?

c++ - MIPS 模拟器 --- 将指令读入内存 (C++)

c++ - 是否可以在没有拷贝的情况下将 std::vector<int> 作为参数传递给获得 std::vector<std::array<int, 3>> 的 fun?

c++ - VS 调试器中未正确显示具有嵌套类型的 QList

c++ - Qt音乐播放器: mini player mode

c++ - 从子部件中删除 QGraphicsEffect

python - PyQt5 - 传递的引用为 None

c++ - QWidgets 是否为成员(member)?