PDA

View Full Version : QTreeView::doubleClicked(const QModelIndex&) signal



Vladimir
5th July 2007, 18:33
Hello All !

For some strange reason when I'm setting
qtreeView->setEditTriggers(QAbstractItemView::CurrentChanged)
the doubleClicked signal is no longer emited. Is it normal (but undocumented) behavior or a bug ?

jpn
5th July 2007, 18:54
I guess the view doesn't even receive a double click event because the first press causes an editor to be opened in front of the view.

Vladimir
5th July 2007, 22:01
In my case editor opens in another column (just like in Designer properties editor) and not under mouse. I've tried to install eventFilter for treeView but it does not receives any events at all (mouseTracking is enabled).

wysota
6th July 2007, 00:35
Remember that it's the viewport that receives events, not the view itself.

jpn
6th July 2007, 06:54
Most likely the view also loses focus by the time an editor is opened.

Vladimir
6th July 2007, 09:25
Remember that it's the viewport that receives events, not the view itself.
Yes, I've not thought about it ! I've installed eventFilter for viewport and now this approach works.