I am using that.
Originally it was without 'if (baza) ...' statement.Qt Code:
void GlavnoO::test_clicked() { bool ok = FALSE; if (baza) { ok = baza->isOpen(); };To copy to clipboard, switch view to plain text mode
I am using that.
Originally it was without 'if (baza) ...' statement.Qt Code:
void GlavnoO::test_clicked() { bool ok = FALSE; if (baza) { ok = baza->isOpen(); };To copy to clipboard, switch view to plain text mode
So what's wrong with that? The form you use it in doesn't matter. You can use QSqlDatabase::database() from anywhere. Just makesure addDatabase() has been invoked earlier.
Lebowski (6th April 2006)
Yep, it does work now!! Thanx all.![]()
Seems I was missing QSqlDatabase::database() statement so my 'baza' pointer had a random value.
Bookmarks