hello,everyone
i use the QtDBus in my Qt4.6.2 application. Before run my application, it's necessary to run the DBus session process and the DBus session process must be runing untill my application exit.
I run the DBus session process by input "dbus-daemon --config-file = session.conf" in the hyperterminal at first.
Now I want the DBus session process could autorun in my application, i have tried two method but not succeed:
1. the "dbus-daemon.exe" and the "session.conf" are in the "DBusEssential"
system("/DBusEssential/dbus-daemon --config-file=/DBusEssential/session.conf");
system("/DBusEssential/dbus-daemon --config-file=/DBusEssential/session.conf");
To copy to clipboard, switch view to plain text mode
the "system" excute the command, but it exit at once. My application need the DBus session process is always running.
2.
myProcess.start("/DBusEssential/dbus-daemon --config-file=/DBusEssential/session.conf");
QProcess myProcess;
myProcess.start("/DBusEssential/dbus-daemon --config-file=/DBusEssential/session.conf");
To copy to clipboard, switch view to plain text mode
I Know it's not correct to use like this, but i don't know the correct way.
May be the "session.conf" could write to the "config-file" of the "dbus-daemon.exe", and then "start " the "dbus-daemon.exe"? How to??
please help me. thanks very much.
regards for any advice!!!
Bookmarks