title: pyqt - How to change the color of a word from my textedit
body: <p>This is a method to copy a word from my textedit, and set it to a new line into my tableview. What i need is: How to change the color of the word that i selected into my textedit? The name of my text edit is "editor", when i copy the word i need change the color of this word, and i dont know how to do it. help please :). With examples please ~~</p>
  
  <pre><code> def addLineTable(self):
  
      row = self.model.rowCount()   #create a line into my tableview
      self.model.insertRows(row)
      column = 0
      index = self.model.index(row, column)        
      tableView = self.TABLE            
      tableView.setFocus()
      tableView.setCurrentIndex(index)
      cursor = self.editor.textCursor()
      textSelected = cursor.selectedText()  #set text to cursor
      self.model.setData(index, QVariant(textSelected)) #set text to new tableview line
  </code></pre>