我试图使用QProcess
调用IE应用程序,将IE窗口嵌入到一个QFrame
中。我在Win7 32位操作系统上使用Qt 5.2.1。
我尝试了以下几种方法:
Try to set the parent of the process to be the frame, instead of the MainWindow by this
QProcess *process = new QProcess(ui->frame_Video);
通过这个AND操作
QProcess *process = new QProcess(ui->frame_Video);
process->setParent(ui->frame_Video);
我尝试使用 QWidget::createWindowContainer()
方法,按照以下工作流程进行:
获取IE窗口的WId(通过IE窗口的hWnd或其他方法)
使用QWindow::fromWinID()
创建一个QWindow
将QWindow
传递给QWidget::createWindowContainer()
我的问题:
- 是否可以将IE窗口嵌入到Qt应用程序中?
- 关于我的第一种方法,如何使QFrame对象成为QProcess的父对象
- 第三种方法是否有效?(我仍需要找到如何将hWnd转换为WId的方法)
QProcess
没有实现任何嵌入功能。它会在你的 Qt 应用程序中运行一个单独的进程(应用程序)。你可以尝试查看QAxWidget
。 - vahancho