1
0

customevent.h 384 B

123456789101112131415161718
  1. #ifndef CUSTOM_EVENT_H
  2. #define CUSTOM_EVENT_H
  3. #include <QEvent>
  4. #include <QString>
  5. const static QEvent::Type qEventRecvMsg = (QEvent::Type)(QEvent::User + 1);
  6. class QStringEvent : public QEvent {
  7. public:
  8. QStringEvent(const QString& msg = "", QEvent::Type type = qEventRecvMsg) : QEvent(type)
  9. {
  10. message = msg;
  11. }
  12. QString message;
  13. };
  14. #endif // CUSTOM_EVENT_H