Reputation:
there's a text editing widget in my QT Widget application. My menu item checks to see if the text edit below is empty. Thus, I'm trying to create a function that checks and returns true/false depending on the situation. Can anyone help me?
Upvotes: -3
Views: 991
Reputation: 73304
Here's a simple way to do it (illustrated with a function, for clarity):
bool IsTextEditEmpty(const QTextEdit * myTextEdit)
{
return myTextEdit->document()->isEmpty();
}
Upvotes: 3