Hello,

I have this fantastic class like this:

Qt Code:
  1. class MyDialog : public QDialog
  2. {
  3. Q_OBJECT
  4. public:"
  5. //etc, etc
  6.  
  7. signals:
  8. matrixChanged(D3DXMATRIX const & matrix);
  9. };
To copy to clipboard, switch view to plain text mode 

and my happy class using this dialog. defined like this:

Qt Code:
  1. class MyDialogUser : public QItemDelegate
  2. {
  3. Q_OBJECT
  4. public:
  5. void ShowDialog();
  6.  
  7. private slots:
  8. void OnMatrixChanged(D3DXMATRIX const & matrix);
  9. };
To copy to clipboard, switch view to plain text mode 

Now, I connect these signals in the method called ShowDialog. After a debugging the Qt
meta object I discovered the only way this works is to do it like this:

Qt Code:
  1. //implementation of ShowDialog
  2. void MyDialogUser::ShowDialog()
  3. {
  4. MyDialog dlg;
  5. connect(&dlg, SIGNAL(matrixChanged(D3DXMATRIX)), this, SLOT(OnMatrixChanged(D3DXMATRIX)));
  6. dlg.exec();
  7. }
To copy to clipboard, switch view to plain text mode 

However I would expect (just see some Qt samples) that, regarding the definition of my slot and signal, I am supposed to do it like this:

Qt Code:
  1. void MyDialogUser::ShowDialog()
  2. {
  3. MyDialog dlg;
  4. connect(&dlg, SIGNAL(matrixChanged(D3DXMATRIX const &)), this, SLOT(OnMatrixChanged(D3DXMATRIX const &)));
  5. dlg.exec();
  6. }
To copy to clipboard, switch view to plain text mode 

Is there some explanation for this? Am I doing something wrong in the function definitions? In all other cases I do it in the second way, but only in this class I discovered this thing...

Regards,
Arthur