[Qt-interest] QSql doubts

Bill King bill.king at nokia.com
Mon Jul 20 00:59:08 CEST 2009


ext Yuvaraj R wrote:
> once i close my application..
>  
> Again i login in my app.. will it store my previous details. otherwise
> i have to go for QSettings
>  
>  
> Thanks
>  
> Yuvaraj R
>
> On Fri, Jul 17, 2009 at 5:52 PM, Sanderson Coelho
> <sanderson.coelho at openbossa.org
> <mailto:sanderson.coelho at openbossa.org>> wrote:
>
>     Hi,
>
>     addDatabase method does not create a new database, but creates a
>     new connection to database.
>     and if this already exists, this is removed and a new connection
>     is created.
>
>
You can still use sqlite to do this, just change
db.setDatabaseName(":memory:"); to something like
db.setDatabaseName("/path/to/localfile"); and whatever you store will be
persisted to that file.

-- 
Bill King, Software Engineer
Qt Software, Nokia Pty Ltd
Brisbane Office




More information about the Qt-interest-old mailing list