[Qt-interest] Problems with signals in QListView

Pradeep K V pradeep.vijayan at gmail.com
Tue Mar 17 14:04:18 CET 2009


Hello,
The signature of the signal is:
void QListView::indexesMoved ( const QModelIndexList & indexes ).
Looks like a *const* is missing from the slot


Sajauddin Shariff Mohammad wrote:
> 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.

-- 
Pradeep Kesavasoudham Vijayan
Bugless Software Development Ltd.
#1 Qt Software/Nokia business partner in the UK
www.bugless.co.uk



More information about the Qt-interest-old mailing list