[SOLVED] Mark QTextDocument as not modified
-
Hello,
I would like to update the modified property in QTextDocument once the contents of a QTextEdit/QPlainTextEdit have been saved to a file. I do not see any obvious way to go about doing that. In my close implementation I would like to check the modified status and show a notice to users that there are unsaved edits. I could of course maintain my own flag(s) and use it for my close implementation, but wanted to make sure I was not missing a built-in feature.
Thanks
Rakesh -
Have you tried "setModified":http://qt-project.org/doc/qt-5/qtextdocument.html#modified-prop ?
-
[quote author="sptrakesh" date="1414969970"]By constant casting the instance made available through the editor document method.[/quote]
Huh? The document() method of QTextEdit returns QTextDocument*. What do you need a const cast for?