Active Topics

 


Reply
Thread Tools
Posts: 61 | Thanked: 51 times | Joined on Feb 2010 @ Zurich
#1
Hi there,

Is there a way to start the default application depending of the Mime-Type?

I would like to import a Vcard but with QDesktopService:penUrl(file.vcf) the browser and not the addressbook starts up.

if I open the file with the filemanager then it starts correctly the addrebook.

Can I maybe use DBUS?

Thanks for any help

Orlando
 
Posts: 61 | Thanked: 51 times | Joined on Feb 2010 @ Zurich
#2
I have found the solution with DBus

from terminal execute:

dbus-send --print-reply --type=method_call --dest=com.nokia.osso_addressbook /com/nokia/osso_addressbook com.nokia.osso_addressbook.mime_open string:'filename.vcf'

with QT:

QDBusInterface *ABook = new QDBusInterface("com.nokia.osso_addressbook", "/com/nokia/osso_addressbook", "com.nokia.osso_addressbook", dbus);

ABook->call("mime_open", file.fileName());


thanks

orlando
 

The Following 3 Users Say Thank You to oprocopio For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:46.