Is that it?
Is that it?
No, that just deletes the structure holding the pointers to all UI elements.
Why do you want to explicitly delete the model at all?
Just pass your window as a parent and let it delete the model just like it deletes its UI children.
Cheers,
_
To avoid garbage in the Heap.
Added after 1 23 minutes:
Is it possible to do this with a program and how would I do it?
You choose a Table(from MySQL database) with for example 4 fields and press a button.
When you press the button 4 labels (out of 7 labels) are named with the name fields of the chosen table.
For example table has fields: name, age, salary, email
When you choose the table with those fields 4 out of 7 labels text become age, name ...
Last edited by Emit; 7th November 2014 at 14:15.
I was not suggesting to not delete the object, was I?
QDataWidgetMapper
Cheers,
_
Emit (7th November 2014)
Bookmarks