QT clicked signal dosnt work on QStandardItemModel with tree view
Posted
by user63898
on Stack Overflow
See other posts from Stack Overflow
or by user63898
Published on 2010-06-01T03:20:33Z
Indexed on
2010/06/01
3:33 UTC
Read the original article
Hit count: 299
Hello i have this code in QT and all i want to to catch the clicked event when some one clicking in one of the treeview rows without success
here is my code:
(parant is the qMmainwindow)
m_model = new QStandardItemModel(0, 5, parent);
// then later in the code i have
proxyModel = new QSortFilterProxyModel;
proxyModel->setDynamicSortFilter(true);
setSourceModel(createMailModel(parent));
ui.treeView->setModel(proxyModel);
ui.treeView->setSortingEnabled(true);
ui.treeView->sortByColumn(4, Qt::DescendingOrder);
// and my signal/slot looks like this but its not working
//and im not getting eny clicked event fired
connect(ui.treeView,SIGNAL(Clicked(const QModelIndex& ) ),
this,SLOT( treeViewSelectedRow(const QModelIndex& ) ) );
also how can i debug QT signal/slots so i can see some debug massages printing when something is wrong ?
© Stack Overflow or respective owner