PDA

View Full Version : Using a common datamodel across dialogs?



Frozenjim
14th October 2008, 00:58
I have created a QSqlQueryModel (*model) at app startup.

Each dialog that opens should be using this model.

How do I tell Dialog#1 or Dialog#2 to use the model created in MainWindow?

So far, I have been recreating the model for each Dialog - which means that the data may not always be synchronized between Dialogs.

JimDaniel
14th October 2008, 01:14
Create one model and pass around a pointer to any dialog that needs it?