I want to know whether the user had changed the content of QTextEdit. However, this signal is also emited when formatting is applied, while the content had nothing changed in fact. both of the fellowing ways are failed, I don't know how to solve this problem! Any help is appreciated!
Qt Code:
  1. m_pText = new QTextEdit(this);
  2. connect(m_pText->document(),SIGNAL(contentsChanged()),this,SLOT(slot_setModified()));
  3. //or this way
  4. connect(m_pText,SIGNAL(textChanged()),this,SLOT(slot_setModified()));
To copy to clipboard, switch view to plain text mode