Hy, I'm a french student (15 years old) so sorry for my english

Code 1)
Qt Code:
  1. connect(textEdit, SIGNAL(textChanged()), SLOT(documentWasModified()));
To copy to clipboard, switch view to plain text mode 

With this code, when I launch my application, my title is always "myfile* - myapp"

Code 2)
Qt Code:
  1. connect(textEdit->document(), SIGNAL(textChanged()), SLOT(documentWasModified()));
To copy to clipboard, switch view to plain text mode 

With the code 2), when I make a modification in my textEdit, the title stays "myfile - myapp" instead of "myfile* - myapp".

The code of "documentWasModified" :

Qt Code:
  1. void MainWindowimpl::documentWasModified()
  2. {
  3. setWindowModified(textEdit->document()->isModified());
  4.  
  5. QString name;
  6. if (currentFile.isEmpty())
  7. {
  8. name = "sanstitre";
  9. }
  10. else
  11. {
  12. name = strippedName(currentFile);
  13. }
  14.  
  15. setWindowTitle(tr("%1[*] - %2").arg(name).arg(tr("SamSoft_DEV")));
  16. }
To copy to clipboard, switch view to plain text mode 

thank you in advance