I am reading the C++ GUI Programming with Qt4 2nd Edition book trying to learn Qt. I am completely new to Qt and C++. I have experience with C#, Java, VB, Python, and PHP, but C++ is just so new right now that I'm having trouble figuring out how stuff works. The worst part is I don't know how to Google something like this. Anyways, to my question...

I'm on Chapter 5, Creating Custom Widgets where you subclass QSpinBox in order to create HexSpinBox. This is the code I am referring to:
Qt Code:
  1. #ifndef HEXSPINBOX_H
  2. #define HEXSPINBOX_H
  3.  
  4. #include <QSpinBox>
  5.  
  6.  
  7. class HexSpinBox : public QSpinBox
  8. {
  9. Q_OBJECT
  10. public:
  11. HexSpinBox(QWidget *parent = 0);
  12.  
  13. protected:
  14. QValidator::State validate(QString &text, int &pos) const;
  15. int valueFromText(const QString &text) const;
  16. QString textFromValue(int value) const;
  17.  
  18. private:
  19. QRegExpValidator *validator;
  20. };
  21.  
  22. #endif
To copy to clipboard, switch view to plain text mode 

My question is about the line
Qt Code:
To copy to clipboard, switch view to plain text mode 
What does this line do? Why am I not doing something like a
Qt Code:
  1. #include <QRegExpValidator>
To copy to clipboard, switch view to plain text mode 
instead? This is probably a trivial thing for someone with more experience, so I'm sorry if this is a stupid question. I'm sure I'll have several more simple questions as I keep reading.