简体   繁体   English

在win32 MDI区域中显示QWidget

[英]Show a QWidget in win32 MDI area

I am trying to extend a legacy win32 application functionalities. 我正在尝试扩展旧版Win32应用程序功能。 The legacy application has a Multiple Document Interface(MDI) as it's main window and is purely written in win32 API. 遗留应用程序的主窗口具有多文档接口(MDI),并且完全用win32 API编写。 Is it possible to show a QWidget in win32 MDI area as a child? 是否可以在孩子的win32 MDI区域中显示QWidget?

Are you using MFC? 您在使用MFC吗?

What's important to understand is that running Qt always requires you have a running Qt event loop. 要理解的重要一点是,运行Qt始终需要您具有运行的Qt事件循环。 So what you need is to properly process your MFC/win32 events an the Qt events. 因此,您需要正确处理MFC / win32事件和Qt事件。

There is the Qt solution QtWinMigrage for that supports Qt 4 and Qt >= 5.4 (Qt 5.0-5.3 are broken). 有一个Qt解决方案QtWinMigrage用于支持Qt 4和Qt> = 5.4(Qt 5.0-5.3已损坏)。 Examples also show your use case. 示例还显示了您的用例。

This is certainly a good starting point if your application is based on CWinApp. 如果您的应用程序基于CWinApp,那么这当然是一个很好的起点。

Further details can be found by searching the internet and reading about the QAbstractEventDispatcher . 可以通过搜索互联网并阅读QAbstractEventDispatcher来找到更多详细信息。 Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM