@wagmare:
Thank you.
Since I wanted to have access to the index in another file (code2.cpp), i have written this line in code1.cpp:
connect(mComboBoxSigSelect, SIGNAL(currentIndexChanged(int)), this, SIGNAL(CurrentIndex(int)));
connect(mComboBoxSigSelect, SIGNAL(currentIndexChanged(int)), this, SIGNAL(CurrentIndex(int)));
To copy to clipboard, switch view to plain text mode
and mentioned
signals:
int CurrentIndex(int);
in its header so that I can emit the signal from code1.cpp.
Is it not right?
As you said, if its in the same file, then it would be written as:
connect(mComboBoxSigSelect, SIGNAL(currentIndexChanged(int)), this, SLOT(CurrentIndex(int)));
connect(mComboBoxSigSelect, SIGNAL(currentIndexChanged(int)), this, SLOT(CurrentIndex(int)));
To copy to clipboard, switch view to plain text mode
and in its header file-
private slots:
void currentIndex(int);
Please clarify, thanks
Bookmarks