title: QtSql: QSqlRecord doesn't keep the table prefixes
body: <p>I'm working on a small application in Qt and I'm using the SQL library together with SQLite as the database. So far this has worked out well. The <code>QSqlQuery</code> class only provides a method for getting column values by <strong>index</strong> instead of <strong>field name</strong>. However, using the <code>record()</code> function the current row on the query can be turned into a <code>QSqlRecord</code>, which has the <code>value()</code> function for getting values by field name.</p>
  
  <p>So, this works out just fine and allows me to write shorter and cleaner code, but a join query like the following brings problems:</p>
  
  <pre><code>SELECT t1.*, t2.* FROM table1 AS t1, table2 AS t2 WHERE t1.table2_id=t2.id
  </code></pre>
  
  <p>So we execute this query as normal, and convert a row to a record. But turns out that the column names in the <code>QSqlRecord</code> aren't prefixed with the table name - for example, there are two columns called <code>id</code> to be found in the record object. This is obviously a bit problematic.</p>
  
  <p>What's the best solution to this problem?</p>
  
  <p>(I've found <a href="http://bugreports.qt.nokia.com/browse/QTBUG-7170" rel="nofollow noreferrer">this issue</a> in the Qt bug tracker, but it's not of much help.)</p>