code 1) You must reset the title after saving, so it is your job to make the * disappear.
code 2) QTextDocument does not have a textChanged signal. Instead it provides the contentsChanged signal, but I'm guessing that using this won't make much difference over situation 1.
The bottom line is that when you save the file, you must manually remove the * from the window title.
For example, if you save with "CTRL+S", then in the slot connected to triggered() signal of this action, you parse the window title and remove the * from it, then you set it back.
Regards
Bookmarks