View Single Post
Old 02-20-2020, 09:32 AM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,682
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I honesty don't see a way around this that doesn't involve some rather drastic measures for such a cosmetic anomaly. We're currently relying on the built-in "edit" feature of QAbstractView (inherited by QTreeView) to do the renaming. Unless I'm missing something obvious, being able to handle the situation where a rename is canceled by clicking the mouse outside of the edit area would involve creating our own custom editor widget either through subclassing or by using a QStyledItemDelegate just to be able to install an event filter that captures the stray rename-"canceling" mouse-click.

My advice? Just train ourselves to hit ESC to cancel a rename instead.

Last edited by DiapDealer; 02-20-2020 at 09:35 AM.
DiapDealer is offline   Reply With Quote