Unsolved QTableWidget - wanna lose focus when clicking away
-
Hey!
Is it possible that if you lose the focus when you click away from the QTableWidget? Currently, it doesn't happen.
I'm using QT 5 for C++ and I thought about connecting a signal, which gets fired when I click away, to a focus.I hope that you can help me!
-
@FluentCoding
What have you tried? You should be finding that you do get one ofQWidget
"focus events" --- note these are events, not signals, so you have to subclass --- or there isQApplication::focusChanged
signal which doesn't require subclassing. -
Yeah, I have already looked for some solutions. As you've said there is the possibility to subclass QWidget to overwrite the focus event or to use the focusXXX signals. I've heard that you can even use an eventfilter. Yeah, I need to try it out, I already forgot what I have tried tbh lol. Thanks for the answer!
-
May I ask why?
(I smell the stench of
setItemWidget
) -
-
@FluentCoding
What didn't work? If you're not getting aQApplication::focusChanged
then you're not managing to change any focus at all. -
@FluentCoding said in QTableWidget - wanna lose focus when clicking away:
unselect his selection and it isn't possible currently,
Crtl+click unselects