#ifndef SELF_DESTROY_MESSAGE_BOX_H
#define SELF_DESTROY_MESSAGE_BOX_H

#include <QObject>
#include <QMessageBox>
#include <QTimer>
class SelfDestroyMessageBox : public QMessageBox
{
    Q_OBJECT
public:
    SelfDestroyMessageBox(QString warningInfo, int msec, QWidget *parentWin);
    ~SelfDestroyMessageBox();
    void onShow();
private:
    SelfDestroyMessageBox(SelfDestroyMessageBox const&)=delete;
    SelfDestroyMessageBox& operator=(SelfDestroyMessageBox const &)=delete;

    QWidget *m_parentWin;
    QTimer m_timer;
};

#endif // SELF_DESTROY_MESSAGE_BOX_H
