子流程作为QT小部件 [英] Subprocess as QT widget

查看:129
本文介绍了子流程作为QT小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个简单的IDE,里面有一个嵌入的,非QT的OpenGL渲染器。为了防止segfault在渲染器崩溃我的应用程序我愿意创建它作为一个子进程,并以某种方式将它作为一个小部件在我的QT主窗口。这是可能吗?

I'm developing a simple IDE that has a embed, non-QT OpenGL renderer inside it. To prevent segfault's on the renderer to crash my application I'm willing to create it as a subprocess and somehow attach it as an widget on my QT main window. Is that possible?

推荐答案

是的,您需要使用 QX11EmbedContainer ,然后在另一个进程中显示您的opengl小部件。

Yes, you need to use QX11EmbedContainer in the main process, and then in another process to show your opengl widget.

这篇关于子流程作为QT小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆