[SOLVED] How to disable expanding and collapsing by mouse double-click in QTreeView ?
General and Desktop
3
Posts
2
Posters
9.1k
Views
1
Watching
-
wrote on 18 Dec 2012, 13:09 last edited by
I've got some classes QTreeView and QAbstractItemModel. I process activated(const QModelIndex &) signal of my view. When I double-click on item it emits activated and also collapse/expand current item. I need to block expanding/collapsing or block emitting signal when double click.
-
wrote on 19 Dec 2012, 12:07 last edited by
It seems like eventFilter can solve my problem.
-
wrote on 19 Dec 2012, 12:48 last edited by
check "expandsOnDoubleClick : bool property of QTreeView":http://qt-project.org/doc/qt-4.8/qtreeview.html#expandsOnDoubleClick-prop
1/3