Hello,
I have just solved a weird problem connecting signals and slots from different namespaces, but I want to be sure I am not complicating matters. I have the following class:

Qt Code:
  1. namespace MyLibrary
  2. {
  3. class Data {
  4.  
  5. };
  6.  
  7. class Emitter {
  8. signals:
  9. void newData(const Data& d);
  10. };
  11.  
  12. }
To copy to clipboard, switch view to plain text mode 

Then, in MyApplication, I'm trying to connect to the "newData" signal as follows:

Qt Code:
  1. namespace MyApplication {
  2. ...
  3. connect(emitter, SIGNAL(newData(const MyLibrary::Data&)), this, SLOT(onNewData(const MyLibrary::Data&)));
  4. ...
  5. }
To copy to clipboard, switch view to plain text mode 

but this does not work. To make it work, I needed to change the Emitter class as follows:

Qt Code:
  1. class Emitter {
  2. signals:
  3. void newData(const MyLibrary::Data& d); // added namespace specifier: completely useless as far as C++ is concerned, I believe
  4. };
To copy to clipboard, switch view to plain text mode 

Is this the standard way to fix the problem? Am I missing something?

Thank you