Most example I was able to find were putting sql data into PyQt list/table widgets. But I wasn't able to find example to do basic query. Can anyone help give me some basic please?<br><br>For example, if I query selecting from a table with 3 records<br>
<br><pre class="lang-sql prettyprint"><code><span class="pln"> query </span><span class="pun">=</span><span class="pln"> QtSql</span><span class="pun">.</span><span class="pln">QSqlQuery</span><span class="pun">(</span><span class="pln">db</span><span class="pun">)</span><span class="pln"><br>
query</span><span class="pun">.</span><span class="pln">exec_</span><span class="pun">(</span><span class="str">"SELECT id, password FROM user"</span><span class="pun">)</span></code></pre>How do I access each record and return them as ordinary Python strings and not QString?<br>