Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
DCOPClient * client = new DCOPClient(); client->attach(); QCString appID = client->registerAs(CLIENTNAME, false); client->setNotifications(true); Stuff * stuff = new Stuff(); int callID = client->callAsync(argv[1], "receiver", "async()", data, stuff, SLOT(theCallBackSlot(int, const QCString&, const QByteArray&) )); if (callID > 0) { printf ("callAsync succeeded with ID=%i\n", callID); printf ("We are back can do something else\n"); } else { printf ("callAsync failed\n"); } |
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#include <qobject.h> #include <qcstring.h> #include <stdio.h> class Stuff : public QObject { Q_OBJECT public: Stuff(); ~Stuff(); public slots: void theCallBackSlot(int callId, const QCString& replyType, const QByteArray &replyData); }; Stuff::Stuff() : QObject(NULL, NULL) {} Stuff::~Stuff() {} void Stuff::theCallBackSlot(int callId, const QCString& replyType, const QByteArray &replyData) { printf ("CallBackSlot fired for ID:%i\n", callId); } |
Forum Software: Burning Board®, developed by WoltLab® GmbH
Linux Computer - Linux Forum -
Linux Computer und Notebooks - Lastminute - Wasserbetten & Whirlpools