开发者

QT widget signals - comprehensive list?

开发者 https://www.devze.com 2023-03-17 09:21 出处:网络
Looking for a comprehensive listing of the various SIGNALS emitted by the b开发者_StackOverflowuilt in QT4 widgets. Have looked around - can\'t seem to find one. (Using PyQT 4.x and Python 3.2)

Looking for a comprehensive listing of the various SIGNALS emitted by the b开发者_StackOverflowuilt in QT4 widgets. Have looked around - can't seem to find one. (Using PyQT 4.x and Python 3.2)

TIA


The following code lists all signals for all QObject subclasses in QtGui:

from PyQt4 import QtGui, QtCore
import inspect
for name in dir(QtGui):
    obj = getattr(QtGui, name)
    if inspect.isclass(obj) and issubclass(obj, QtCore.QObject):
        for name2 in dir(obj):
            obj2 = getattr(obj, name2)
            if isinstance(obj2, QtCore.pyqtSignal):
                print name, name2


I would think that the Qt documentation has all available signals.

0

精彩评论

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