PDA

View Full Version : can't make QAbstractItemView signals work



ber_44
29th May 2007, 03:47
I have the following code, and the signal does nothing:



listOrIconView = new QListView(this);
listOrIconView->setModel(proxyModel);
listOrIconView->setEditTriggers(QAbstractItemView::NoEditTriggers) ;
connect(listOrIconView, SIGNAL(activated(const QModelIndex &index)), qApp, SLOT(quit()));

jpn
29th May 2007, 07:29
You may not put parameter names to the connect statement:


connect(listOrIconView, SIGNAL(activated(const QModelIndex &)), qApp, SLOT(quit()));