title: Virtual column in QTableView?
body: <p>I'm started to learning Qt4 Model/View Programming and I have beginner question.</p>
  
  <p>I have simple application which show sqlite table in <code>QTableView</code>:</p>
  
  <pre><code>class Model(QtSql.QSqlTableModel):
      def __init__(self, parent=None):
          super(Model, self).__init__(parent)
          self.setEditStrategy(QtSql.QSqlTableModel.OnFieldChange)
  
          self.setTable("test")
          self.select()
  
  class App(QtGui.QMainWindow):
      def __init__(self, model):
          QtGui.QMainWindow.__init__(self)
  
          self.ui = Ui_MainWindow()
          self.ui.setupUi(self)
  
          self.ui.tableView.setModel(model)
  
  if __name__ == "__main__":
      myDb = QtSql.QSqlDatabase.addDatabase("QSQLITE")
      myDb.setDatabaseName("test.db")
  
      if not myDb.open():
          print 'FIXME'
  
      model = Model()
  
      app = QtGui.QApplication(sys.argv)
      window = App(model)
      window.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Here how database looks like:</p>
  
  <pre><code>sqlite&gt; create table test (a INTEGER, b INTEGER, c STRING);
  sqlite&gt; insert into test VALUES(1, 2, "xxx");
  sqlite&gt; insert into test VALUES(6, 7, "yyy");
  </code></pre>
  
  <p>So I'm getting something like:</p>
  
  <pre><code>+---+---+-----+
  | a | b |  c  |
  +---+---+-----+
  | 1 | 2 | xxx |
  +---+---+-----+
  | 6 | 7 | yyy |
  +---+---+-----+
  </code></pre>
  
  <p>Is it possible to modify <code>Model</code> to have in <code>QTableView</code> something like virtual column? For example something like:</p>
  
  <pre><code>+---+---+-----+-----+
  | a | b | sum |  c  |
  +---+---+-----+-----+
  | 1 | 2 |  3  | xxx |
  +---+---+-----+-----+
  | 6 | 7 | 13  | yyy |
  +---+---+-----+-----+
  </code></pre>
  
  <p>Or maybe I should do it in some other way?</p>