如何在不包含windows.h的情况下在QT中创建事件? [英] How to create event in QT without including windows.h?

查看:183
本文介绍了如何在不包含windows.h的情况下在QT中创建事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在QT中创建事件而不包含windows.h?

How to create event in QT without including windows.h??

推荐答案

Qt使用一种称为信号"的机制而不是特定于OS的事件.使用emit关键字发送Qt信号. http://doc.qt.nokia.com/4.7/signalsandslots.html [ ^ ]
如果要向非Qt进程发送特定于操作系统的事件(例如Windows事件),则必须使用特定于操作系统的机制,例如Windows API.
Qt uses a mechanism called "signals" instead of OS-specific events. Use the emit keyword to send a Qt signal. http://doc.qt.nokia.com/4.7/signalsandslots.html[^]
If you want to send an OS-specific event (e.g. a Windows event) to a non-Qt process then you must use OS-specific mechanisms such as Windows API.


这篇关于如何在不包含windows.h的情况下在QT中创建事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆