开发者

Creating selected and clicked event handlers for Qframe

开发者 https://www.devze.com 2023-03-24 06:32 出处:网络
How can I create an event handler开发者_开发百科 for QFrame such as selected/clicked ??QFrame doesn\'t expose mouse events directly as signals because that\'s not really its purpose - it\'s supposed t

How can I create an event handler开发者_开发百科 for QFrame such as selected/clicked ??


QFrame doesn't expose mouse events directly as signals because that's not really its purpose - it's supposed to be used as a container for other widgets.

If you really want to handle mouse events in a QFrame then you'll have to derive a new class from it and implement the appropriate event handlers, e.g. mousePressEvent.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号