Results 1 to 2 of 2

Thread: Using a common datamodel across dialogs?

  1. #1
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Using a common datamodel across dialogs?

    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.

  2. #2
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Using a common datamodel across dialogs?

    Create one model and pass around a pointer to any dialog that needs it?
    Last edited by JimDaniel; 14th October 2008 at 00:47.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.