I found that codes

Qt Code:
  1. pqUpcaseValidator::pqUpcaseValidator( QWidget* Parent, const char* Name )
  2. : QValidator( Parent, Name )
  3. {}
  4.  
  5. QValidator::State pqUpcaseValidator::validate( QString& Text , int& Pos ) const
  6. {
  7. Text = Text.upper();
  8. return Acceptable;
  9. }
To copy to clipboard, switch view to plain text mode 

What kind of document I should write?
is that currect?

Qt Code:
  1. #ifndef MYUPPERLINE_H
  2. #define MYUPPERLINE_H
  3. #include <QtGui>
  4. class MyUpperLine2 : public QLineEdit
  5. {
  6. public:
  7. MyUpperLine2(QWidget* parent = 0):QLineEdit(parent) { }
  8.  
  9. pqUpcaseValidator::pqUpcaseValidator( QWidget* Parent, const char* Name )
  10. : QValidator( Parent, Name )
  11. {}
  12.  
  13. QValidator::State pqUpcaseValidator::validate( QString& Text , int& Pos ) const
  14. {
  15. Text = Text.upper();
  16. return Acceptable;
  17. }
  18. };
To copy to clipboard, switch view to plain text mode 
and is it enough to promote it by designer?