如何在 QT 上使用 IContextMenu 或 Windows Shell ContextMenu
现在我正在使用 Qt
开发一个搜索应用程序,我想要的是右键单击一个文件以显示 Windows Shell ContextMenu 像这样。
但我能得到的只是 IContextMenu
或 CMenu
。如何在 Qt 中使用它,或将 CMenu 或 IContextMenu 转换为 QMenu。
Right now I'm developing a search app using Qt
, what I want is that right-clicked a file to show the Windows Shell ContextMenu like this.
But all I can get is IContextMenu
or CMenu
. How can I use it in Qt, or transform CMenu or IContextMenu to QMenu.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 Qt 项目中尝试
#include
并以某种方式合并 Windows 内容,尽管将 Windows 代码与 Qt 代码合并可能是一个巨大的挑战。You could try
#include <Windows.h>
in your Qt project and somehow incorporate the Windows stuff, although incorporating the Windows code with the Qt code would probably be a huge challenge.