Why can't I do this?

Qt Code:
  1. class myTextEdit : public QTextEdit {
  2. //blah
  3. };
  4.  
  5. class MainWindow : QMainWindow {
  6.  
  7. private slots:
  8. void getText() {
  9. QString = inputText->text(); //inputText is defined as myTextEdit
  10. }
  11. };
To copy to clipboard, switch view to plain text mode 

This example is highly contrived, but since QTextEdit has a public function called text(), why does the compiler say it isn't a member of myTextEdit...

Thanks