[QT4 & XP] doubleClick on QtreeView
Hi, (again) :o
How do I implement doubleClick event without having my QTreeView go into edit mode ?
Single click signal works fine.
When I use doubleClick signal it does two things :
- first executes my slot (which is nice)
- second it goes into edit mode on that column and row.
I tried setEnabled(false) but then the slot is not activated (I guess this is normal).
Cannot find a member that disables the edit mode.
Is it possible ?
code:
Code:
connect( table, SIGNAL( doubleClicked(const QModelIndex&) ),
this, SLOT( selection(const QModelIndex&) ) );
Re: [QT4 & XP] doubleClick on QtreeView
I'm not 100% sure about this, but try to change view's edit triggers.
QAbstractItemView::editTriggers
So removing QAbstractItemView::DoubleClicked ("Editing starts when an item is double clicked.") should do the trick for you.
Re: [QT4 & XP] doubleClick on QtreeView
fyi
code works with :
table is the QTreeView