steiner
30th October 2007, 18:55
Why can't I do this?
class myTextEdit : public QTextEdit {
//blah
};
class MainWindow : QMainWindow {
private slots:
void getText() {
QString = inputText->text(); //inputText is defined as myTextEdit
}
};
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
class myTextEdit : public QTextEdit {
//blah
};
class MainWindow : QMainWindow {
private slots:
void getText() {
QString = inputText->text(); //inputText is defined as myTextEdit
}
};
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