[PyQt] QListWidget SIGNAL problem

Linos info at linos.es
Mon Dec 10 12:33:47 GMT 2007


Doug Bell escribió:
> Linos wrote:
>>> Hello, i have a problem with a listwidget i have created inside a
>>> QToolBox page, if doesnt emit signals, i can select the items but it
>>> doesnt emit itemDoubleClicked or itemClicked or itemActivated, i
>>> have tried with mouse and keyboard without luck, i have installed an
>>> event filter and do a print to every event it pass and i get no
>>> event in mouse click, double click, or keyboard enter, but i can
>>> navigate through items with keyboard or mouse, anyone has any idea
>>> what can be the problem here? or any better way that an eventfilter
>>> to debug it?
> 
>> I have made an small sample app:
> 
> Your problem is in the signatures of the signals.  In C++, the items are
> passed a pointers.  In PyQt, you need the full signature, including the
> "*".  For example, replace SIGNAL("itemClicked(QListWidgetItem)") with
> SIGNAL("itemClicked(QListWidgetItem*)").
> 
> Doug.

Yes i do it (Phil thompson tell me the same) and now it works, thanks.


More information about the PyQt mailing list