00001 #ifndef _HINTEDIT_H_
00002 #define _HINTEDIT_H_
00003
00004 #include <QLineEdit>
00005 #include <QFocusEvent>
00006
00007 class HintEdit : public QLineEdit
00008 {
00009 Q_OBJECT
00010 public:
00011 HintEdit(QWidget *parent = 0);
00012 QString hintText;
00013 void setHintText(QString str);
00014
00015 signals:
00016 void onEnterEvent();
00017 void onLeaveEvent();
00018
00019 protected:
00020 bool enterFlag;
00021 void focusInEvent(QFocusEvent *event);
00022 void focusOutEvent(QFocusEvent *event);
00023 void paintEvent(QPaintEvent *event);
00024 };
00025
00026
00027 #endif