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!
-
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::focusChangedsignal 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!
-
Because I want give the user the possibility to unselect his selection and it isn't possible currently, @VRonin.
Btw @JonB it didn't work :/ -
Because I want give the user the possibility to unselect his selection and it isn't possible currently, @VRonin.
Btw @JonB it didn't work :/@FluentCoding
What didn't work? If you're not getting aQApplication::focusChangedthen you're not managing to change any focus at all. -
Because I want give the user the possibility to unselect his selection and it isn't possible currently, @VRonin.
Btw @JonB it didn't work :/@FluentCoding said in QTableWidget - wanna lose focus when clicking away:
unselect his selection and it isn't possible currently,
Crtl+click unselects