Re: [Interest] QTreeView and context menu

2014-02-27 Thread Graham Labdon
Thanks for the hints From: Clément Geiger [mailto:clement.gei...@gmail.com] Sent: 27 February 2014 13:57 To: Graham Labdon Cc: Interest@qt-project.org Subject: Re: [Interest] QTreeView and context menu Hello Graham, You can use the contextMenuPolicy Qt::CustomContextMenu. In that case, when

Re: [Interest] QTreeView and context menu

2014-02-27 Thread Clément Geiger
Hello Graham, You can use the contextMenuPolicy Qt::CustomContextMenu. In that case, when your QTreeView receives a right-click, it sends a signal contextMenuRequested(QPoint) that you can connect to a slot. In that slot, you are able to know which item has been clicked through QTreeView::indexAt(