[Qt-interest] Problems with signals in QListView
Sajauddin Shariff Mohammad
shariff at mic.co.in
Tue Mar 17 08:18:23 CET 2009
Dear Friends,
Iam using a QListView in my application. Iam showing some data stored in a string list. I am able to show it successfully. I want to write my functionality such that when an item in a QListView is double clicked, then its details related information should be shown on the screen. For this I have selected SIGNAL(doubleClicked()) and have writtem a slot for it.
My code compilation is OK. When I run the application, the following message is getting displayed
QMetaObject::connectSlotsByName: No matching signal for on_ELListView_indexesMoved(QModelIndexList&)
and no signal is being raised.
My Code:
class empInfo: public QDialog, Ui_EmpInfoDialog
{
Q_OBJECT
public:
empInfo(QDialog *parent=0);
~empInfo();
void fillEmpList(QString);
public slots:
void on_newButton_clicked();
void on_ELListView_doubleClicked(QModelIndex &index);
};
void empInfo::on_ELListView_doubleClicked(QModelIndex &index)
{
cout<<"List view item double clicked\n";
}
Here in my code "Ui_EmpInfoDialog" is my UI class and in that "QListView *ELListView" is my list view widget. I cannot understand why that sinal is not being rcognised while running. Is any tag should be added in .pro file while using model-view classes.
Thanks in advance
Regards,
Sajauddin Shariff
shariff at mic.co.in
+91-998-904-5546
Confidentiality NoticeThe information contained in this Electronic Message
and any ATTACHMENTs to this message are intended for the EXCLUSIVE USE of
the ADDRESSEE(s) and may contain CONFIDENTIAL or PRIVILEGED information.
If you are not the intended recipient, please notify the SENDER at MIC or
itsupport at mic.co.in immediately and DESTROY all copies of this message
and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090317/fad492b6/attachment.html
More information about the Qt-interest-old
mailing list