read my post again. addDatabase() is called only first time. After that use database().

http://doc.qt.nokia.com/latest/qsqld....html#database