Hi all,<br><br>Could someone give me some hints on how to access a digikam database from a new application, using libdigikamdatabase?<br><br>I tried to look in the source code of digikam. I found out I should do something like that:<br>
<br>#include <databaseaccess.h><br> <br>int main(){<br> <br> Digikam::DatabaseAccess::setParameters( <br> Digikam::DatabaseParameters(Digikam::DatabaseParameters::parametersForSQLiteDefaultFile("/path/to/database") )<br>
);<br><br> Digikam::DatabaseAccess::checkReadyForUse
();<br> <br> Digikam::DatabaseAccess DbA = Digikam::DatabaseAccess();<br> // Then I should be able to access the database with:<br> DbA.db()<br><br> };<br><br><br>Now, the problem occurs when I call the function "setParameters". I get the following output:<br>
QEventLoop: Cannot be used without QApplication<br>QObject::connect: Cannot connect (null)::aboutToQuit() to Digikam::DatabaseCoreBackend::slotMainThreadFinished()<br>QEventLoop: Cannot be used without QApplication<br><br>
<br>So the questions are:<br>Am I on the right way or is there a better solution?<br>If I am on the right way, can I use the digikam libs outside of a QApplication? Will it work in a plasmoid?<br><br>Thanks,<br><br>Xavier<br>