title: How to change orientation of Qt TableView
body: <p>Hi I am using a QTableView to display data from a sql table using the qsqltablemodel asfollows:</p>
  
  <pre><code>MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      model = new QSqlTableModel(this);
      model-&gt;setTable("staging");
      model-&gt;select();
      model-&gt;setHeaderData(0, Qt::Vertical, tr("ID"));
      model-&gt;setHeaderData(1, Qt::Vertical, tr("Region"));
      model-&gt;setHeaderData(2, Qt::Vertical, tr("T1"));
      model-&gt;setHeaderData(3, Qt::Vertical, tr("N1"));
      model-&gt;setHeaderData(4, Qt::Vertical, tr("M1"));
  
      ui-&gt;tableView-&gt;setEditTriggers(QAbstractItemView::NoEditTriggers);
      ui-&gt;tableView-&gt;setModel(model);
      ui-&gt;tableView-&gt;showRow(1);
      ui-&gt;tableView-&gt;resizeColumnsToContents();
  
  }
  </code></pre>
  
  <p>I just want to display the table in such a view that columns are presented as rows and rows as columns. I have searched google etc.. but cannot find any simple solution. There is mention of a proxy model but I am unsure how i can implement that with a QSqltablemodel which does not use a data method in this example, rather a model->select() statement which populate the whole model at once. Any guidance will be appreciated.</p>