code: def data(self, index, role=Qt.DisplayRole):
          
          row = index.row()
          if not index.isValid() or not (0 <= row < len(self.servers)):
              return to_qvariant()
  
          server = self.servers[row]
          column = index.column()
  
          if role == Qt.DisplayRole:
              if column == LANGUAGE:
                  return to_qvariant(server.language)
              elif column == ADDR:
                  text = '{0}:{1}'.format(server.host, server.port)
                  return to_qvariant(text)
              elif column == CMD:
                  text = '&nbsp;<tt style="color:{0}">{{0}} {{1}}</tt>'
                  text = text.format(self.text_color)
                  if server.external:
                      text = '&nbsp;<tt>External server</tt>'
                  return to_qvariant(text.format(server.cmd, server.args))
          elif role == Qt.TextAlignmentRole:
              return to_qvariant(int(Qt.AlignHCenter | Qt.AlignVCenter))
          return to_qvariant()
docs: Qt Override.