Neosapien
Neosapien

Reputation: 177

Enter edit mode automatically in Qtreeview

Is there a way to force edit-mode in a qtreeview the moment a new item is created? Currently, I can enter edit mode with a double click by setting the EditTriggers to QAbstractItemView.DoubleClicked. Trying a different approach, I was able to select the newly created item right after creation using setCurrentIndex, but that's pretty much it. Is there a way to do this?

Upvotes: 1

Views: 1450

Answers (1)

Neosapien
Neosapien

Reputation: 177

As @vahancho said, QAbstractItemView::edit() works perfectly.

Upvotes: 1

Related Questions