[PyQt] QListWidget SIGNAL problem
Doug Bell
dougb at bellz.org
Mon Dec 10 12:11:11 GMT 2007
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.
More information about the PyQt
mailing list