just my 2 pence worth. you should perhaps try to make 2 different apps for it. 1 which runs as a daemon and invoked on startup using an upstart http://upstart.ubuntu.com/getting-started.html script. and the other a GUI based app , that can interact with your daemon, via files, sockets, any which way.
cheers Ram ----- Original Message ----- From: Scifi Guy Sent: 05/07/10 03:26 PM To: maemo-developers@maemo.org Subject: Noob question re Qt Application structure Hi All, I am developing a Qt4.6 based application that monitors outgoing international calls (by connecting to relevant DBUS signals) and routes them via a calling card number. I have developed a configuration UI widget (QWidget subclass) to enable/disable such routing. The problem is that the UI widget code and DBUS slots code are all in the same class. If I launch the application, the UI widget is shown. This is the code in my main.cpp. #include <QtGui/QApplication> #include "eventmonitor.h" #include <QDebug> int main(int argc, char *argv[]) { QApplication a(argc, argv); EventMonitor w; w.show(); return a.exec(); } EventMonitor is a QWidget subclass which also has functions to connect to DBUS signals. My aim is to separate the functionality into two different classes. The class with DBus slots should be running as a daemon which is invoked on startup. The class with QWidget (config screen) should be invoked when user launches the app from the applications menu. Think on the lines of AutoDisconnect. What is the best way to achieve this? Let me know if you want me to post more code. Thanks & Regards, Sudheer ----------------------------------------------------------------- The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
_______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers