<br><br><div><span class="gmail_quote">2007/7/10, Mark Summerfield <<a href="mailto:mark@qtrac.eu">mark@qtrac.eu</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 2007-07-10, IloChab wrote:<br>> I'm trying to use QSqlRelationalTableModel to show records on a table that<br>> will grow at run-time.<br>><br>> What I get is that it works fine for records that are already present in
<br>> sql tables but it doesn't for new lines that I add at run-time using<br>> .setData method.<br>><br>> I'll attach to this message the original PyQt example about<br>> QSqlRelationalTableModel that I modified adding an "addRecord" function
<br>> that shows the wrong behaviour I'm talking about.<br>><br>> So I'd like to know what it the correct way to code that function.<br>><br>> Thanks.<br>> Ciao.<br>> Licia<br><br>I haven't tried it, but I think that your problem may solved by adding
<br><br> model.submitAll()<br><br>at the end of your addRecord() method.<br><br></blockquote></div>If I do that, the line that I was trying to add doesn't show at all,
while in my original code it showed without the foreign keys resolved.