Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

responding to events without deriving from Qt's widgets

$
0
0
It’s pretty annoying having to create every time custom widgets where we redefine the event() or mousePressEvent() methods, just for the sake of responding to some events. In my case I only need to respond when the left mouse button is pressed, but I have about 10 QPushButtons that should do different things when pressed… in this case I would end up having 10 different custom widgets derived from QPushButton… looks to me like a waste of time. So, is it possible to respond to events without having to derive Qt’s widgets to custom ones ?

Viewing all articles
Browse latest Browse all 13965

Trending Articles