Hmm... it doesn't print anything in the console. I've also added this before the error:<div><br></div><div>qDebug() << name << "Error!";</div><div><br></div><div>Strange...</div><div><br></div>
<div>Thanks,</div><div>Sascha</div><br><div class="gmail_quote">On Fri, Jun 11, 2010 at 11:57, Sascha Mäkelä <span dir="ltr"><<a href="mailto:sascha.makela@gmail.com">sascha.makela@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Fri, Jun 11, 2010 at 11:42, Daniil Ivanov <span dir="ltr"><<a href="mailto:daniil.ivanov@gmail.com" target="_blank">daniil.ivanov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try this?<br>
<div><br>
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");<br>
QString name = QDir::homePath() + "/CurrencyConverter";<br>
db.setDatabaseName(name);<br>
if (!db.open()) {<br>
qDebug() << name << db.lastError();<br>
return false;<br>
</div> } else {<br>
qDebug() << name << "Great success!";<br>
return true;<br>
}<br>
<br>
Thanks, Daniil.<br>
<div><div></div><div><br></div></div></blockquote></div></div>
</div></div></blockquote></div><br>