Hello,is it possible to have a variable inif the table selected change oftenly?.Qt Code:
tableModel->setTable("myvariable");To copy to clipboard, switch view to plain text mode
Hello,is it possible to have a variable inif the table selected change oftenly?.Qt Code:
tableModel->setTable("myvariable");To copy to clipboard, switch view to plain text mode
Last edited by thefatladysingsopera; 1st August 2011 at 17:30.
IMO the answer is YES.
A camel can go 14 days without drink,
I can't!!!
How is it done?.
You can write a slot/function like this
Qt Code:
{ if (tableName != tableModel->tableName()) { tableModel->setTable (tableName); tableModel->select(); // to populate the model } }To copy to clipboard, switch view to plain text mode
A camel can go 14 days without drink,
I can't!!!
This seems to work
Qt Code:
tablesModel->setTable(japan);To copy to clipboard, switch view to plain text mode
if you don't call select() the model will not be populated
A camel can go 14 days without drink,
I can't!!!
The models are working okay and everything is working as it should. The set table part was the only problem.
Thanks.
Bookmarks