Why can't I do this?
Code:
//blah }; private slots: void getText() { } };
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
Printable View
Why can't I do this?
Code:
//blah }; private slots: void getText() { } };
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
I am afraid there's no such member in QTextEdit.
You can use QTextEdit::toPlainText to retrieve the contained text.
Perhaps you're reading docs of Qt 3 but actually using Qt 4?
yes, 3.3 specifically it clearly states it has a text() method
And what does "qmake -v" output? You should read docs of Qt 4 if that's what you use. Qt 3 and Qt 4 are pretty much different. ;)