PDA

View Full Version : How widges communicate between projects?



yxtx1984
12th January 2010, 13:27
Hello, i am an new guy for Qt. I used to develop in Mac OS with Xcode and cocoa.
And now i meet an problem, that is how communicate between widges from different indepent project?
When use slot and signal, it must to connect sender and receiver, but in different project, you can't do it.
So how can i implement it? Is someting like NSNotification of cocoa in Qt? just send the notification, no matter who receive it?
I guess i should subclass of QCustomEvent, is it right?

Thanks in advance for any point.

high_flyer
12th January 2010, 14:22
Welcome to real programming! ;-)

Qt signal slot mechanism is a nice way of calling function pointers.
It only works in the application scope.

If you want communication between processes, you will have to use one of the following:
DBus (linux), Windows technologies like COM for windows, or more portable - shared memory, pipes and similar.

By the way, you will have the same problem on Mac too, if you code with C/C++ (or not with cocoa).