Hello:
I have a QTreeView (rootIsDecorated=false) with a QItemDelegate on the first column that uses a QLineEdit for editing. I have set editTriggers to QAbstractItemView::AllEditTriggers.
PROBLEM: In order to get into edit mode on that column I sometimes need to click up to 3 times.
Is there any technique to ensure that I get edit mode the very first time I click in the cell?
The flags returned by my model are:
Qt Code:
if (0 == index.column()) { return flags | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled; }To copy to clipboard, switch view to plain text mode
It may even be ideal if that column was always in edit mode?
I set up a custom widget that uses vector if QLineEdits in a QVBoxLayout positioned next to a QTreeView for this effect, but then I must synchronize the vector of QLineEdits and the Model-View. Not exactly ideal...
Any help would be greatly appreciated.
best regards,
Jon K.
Ann Arbor Michigan U.S.A.
Bookmarks