Dear All,
I am pretty new to Qt and I accept this could well be a dumb question.

I dont understand why the slot connection is not working here !!

I have a simple form, with a button, and a tree widget. I have created a custom class for the tree widget, as in here and promoted it in the Qt designer !!

Qt Code:
  1. class QFileBrowser : public QTreeWidget
  2. {
  3. ..
  4. public slots:
  5. void onFilesFoldersSelected();
  6. };
To copy to clipboard, switch view to plain text mode 

The main window has a signal defined as follows !!
Qt Code:
  1. signals:
  2. void filesFoldersSelected();
To copy to clipboard, switch view to plain text mode 

the signals and slot are connected as here !!
Qt Code:
  1. QObject::connect(this, SIGNAL(filesFoldersSelected()), ui->twFileBrowser, SLOT(onFilesFoldersSelected()));
To copy to clipboard, switch view to plain text mode 

But i see that i never land in the slot function. I have debugged and at the emitting part of the signal, it is assumed that nothing is connected.
Qt Code:
  1. if (!sender->d_func()->isSignalConnected(signal_index))
  2. return; // nothing connected to these signals, and no spy .... returns here !! slot is not called !!
To copy to clipboard, switch view to plain text mode 

Could anyone please explain what I am doing wrong ??

Thanks for your time,
Prakash