Tableview Editor not giving focus to tableview after editing finished



  • Solution: Just connected the delegate's closeEditor signal to tableview's setFocus.

    Problem: I have a tableview with a custom delegate, when I edit a cell and the delegate closes the editor, my tableview doesnt get the focus, instead I have to press Tab 3 or 4 times until I see my tableview cell highlighted.

    I'm basically using a stackwidget with different pages and I installed an eventfilter on the widget that corresponds to the stackpage/widget on which my tableview is on and inside the event filter i set focus to my tableview, this improves the situation to where I only need to press tab once and my table gets the focus and from then on it works as intended, however I don't want to press tab and I want the editor to return focus to the tableview itself, I also don't think i should be installing an event filter on my MainWindow since that will eat up events from other stackwidgets too?



  • @Erudite-Monkey Nevermind, no need for any event filters. Just connected the delegate's closeEditor signal to tableview's setFocus.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.