在 Qt 应用程序中使用 WINAPI

发布于 2024-09-08 21:47:13 字数 139 浏览 2 评论 0原文

谁能告诉我是否可以在我的 qt 应用程序中使用 Windows API? 如果是的话,有人可以告诉我这样做的程序吗?我需要在 qt 应用程序中使用 msdn winapi“GetSystemPowerStatus”来显示基于 qt GUI 的应用程序中的电池状态。

Can anybody tell if I can use the Windows APIs in my qt application?
If yes can anybody tell me the procedure to do it? I need to use the msdn winapi "GetSystemPowerStatus" in my qt application to show the battery status in my qt GUI based application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

瑶笙 2024-09-15 21:47:13

是的,您可以通过包含适当的头文件来使用这些 API(一般来说)。

它将使您的代码特定于平台(不可移植),因此如果有跨平台的方法,我会使用它。

Yes, you can use those APIs (generally speaking), by including the appropriate header files.

It will make your code platform-specific (non-portable), so if there is a cross-platform way of doing so, I would use that.

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