在 Qt 应用程序中使用 WINAPI
谁能告诉我是否可以在我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以通过包含适当的头文件来使用这些 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.