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