焦点事件改变了? [英] An event for focus changed?
本文介绍了焦点事件改变了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将我的 Visual Basic 6 程序移植到 PyQt.
I'm porting my Visual Basic 6 program to PyQt.
我需要一直调用一个函数来设置一些小部件的启用/禁用,我不想调用一个函数太多次,所以我找到了一个事件,当焦点从一个小部件切换到另一个小部件时,我可以调用我的小部件管理器功能.
I need to call a function to set some widget enable/disable all the time, I don't want to call a function too many times, so I found a event, when the focus is changed from a widget to another widget, I can call my widget manager function.
我正在 PyQt 中寻找同样的东西,但没有成功.有什么想法吗?
I'm looking for the same thing in PyQt but without success. Any idea?
推荐答案
Signal QApplication::focusChanged(QWidget * old, QWidget * now)
就是你想要的.
Signal QApplication::focusChanged(QWidget * old, QWidget * now)
is what you want.
这篇关于焦点事件改变了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文