[Qt-interest] Fwd: Not able to make new QSqlDatabase() ?

Nikos Geronitidis geronik444 at gmail.com
Thu Oct 1 12:53:14 CEST 2009


---------- Forwarded message ----------
From: Stéphane <stephane at hacout.com>
Date: Thu, Oct 1, 2009 at 12:50 PM
Subject: Re: [Qt-interest] Not able to make new QSqlDatabase() ?
To: qt-interest at trolltech.com


hello

It seem to me that you only create a new object and not a new database...

You will need to call then *setUserName* <#setUserName>, *setPassword*
<#setPassword>, *setHostName* <#setHostName> and *setPort* <#setPort>
if needed
and finaly open it with open call function and then addDatabase to
create a new one

hope this helps.

Best regards
Stéphane
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


QSqlDatabase has a protected constructor, which means that you have to
either
subclass or use the static addDatabase function in order to create a
database
connection.

-- 
Best Regards
Nikos Gerontidis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091001/74399674/attachment.html 


More information about the Qt-interest-old mailing list