开发者

In Qt4 is there a way to know from inside a widget if the focus has been lost?

I am trying to design a couple of simple widgets in order to get a better knowledge of Qt 4. (This is my first attempt at desktop programming - coming from a background of web development)

One of these widgets is formed from a label, and a tool window which pops up when the label is clicked.

My question is related to a method for the original widget to know when it loses mouses focus (ie, the user clicked somewhere开发者_运维百科 else than inside the pop-up or the label) so it can hide the pop-up.


There are focusInEvent and focusOutEvent events. You can override these to get notified about focus changes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜