[PyKDE] QTreeWidget & Signals

Sven Flossmann sven at flossmann-online.de
Mon May 8 20:49:05 BST 2006


Hi,

I'm trying to use signals from QTreeWidget, e.g. the
itemSelectionChanged(), but I have not found a way that works until now.

Is there anybody out who has got this to work?

I've tried two different ways:
a) Use the default handler of the containing widget
def on_treeTasks_itemSelectionChanged(self)

b) Explicit connecting the signal to a method
QtCore.QObject.connect(self.treeTasks,
  QtCore.SIGNAL("itemSelectionChanged()"),
    self.on_treeTasks_itemSelectionChanged)

btw: Is there a possibility on checking for the existance of a signal?
QObject.connect() method does not care wheather the signal specified
exists or not.

btw2: Is there a possibility to get all signals from an object?


I'm using QT 4.1.2 and PyQT4 Beta1.


Thanks a lot,
	Sven




More information about the PyQt mailing list