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 !!
{
..
public slots:
void onFilesFoldersSelected();
};
class QFileBrowser : public QTreeWidget
{
..
public slots:
void onFilesFoldersSelected();
};
To copy to clipboard, switch view to plain text mode
The main window has a signal defined as follows !!
signals:
void filesFoldersSelected();
signals:
void filesFoldersSelected();
To copy to clipboard, switch view to plain text mode
the signals and slot are connected as here !!
QObject::connect(this,
SIGNAL(filesFoldersSelected
()), ui
->twFileBrowser,
SLOT(onFilesFoldersSelected
()));
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.
if (!sender->d_func()->isSignalConnected(signal_index))
return; // nothing connected to these signals, and no spy .... returns here !! slot is not called !!
if (!sender->d_func()->isSignalConnected(signal_index))
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
Bookmarks