如何在 QT 上使用 IContextMenu 或 Windows Shell ContextMenu

发布于 2024-12-23 09:13:29 字数 288 浏览 2 评论 0原文

现在我正在使用 Qt 开发一个搜索应用程序,我想要的是右键单击一个文件以显示 Windows Shell ContextMenu 像这样

但我能得到的只是 IContextMenuCMenu。如何在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹿童谣 2024-12-30 09:13:29

您可以在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文