PDA

View Full Version : QListWidget signals?



cnbp173
12th September 2012, 20:17
Hi all,

I'm having a weird problem, where none the QListWidget signals appear to be emitting


connect(jobListLW,SIGNAL(itemClicked(QListWidgetIt em * item)),this,SLOT(slotTest(QListWidgetItem * item)));

Should transfer me to the slotTest routine when I click or select an item in the List Widget, but nothing is happening.

I checked and the item is Selectable and Enabled, but still nothing.

Any thoughts as to what I've missed?

R

Added after 56 minutes:

Actually, weirder still

Only the currentRowChanged and itemSelectionChanged signals seem to be working.

None of the ones that pass the item pointers seem to be working.

R

maxoutlaw
12th September 2012, 20:24
Hi all,

I'm having a weird problem, where none the QListWidget signals appear to be emitting


connect(jobListLW,SIGNAL(itemClicked(QListWidgetIt em * item)),this,SLOT(slotTest(QListWidgetItem * item)));

If I correctly understood, the signal doesn't reach the slot?
In case of connection it is necessary to specify signals and slots with unnamed arguments, as it:

connect(jobListLW, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(slotTest(QListWidgetItem*)));

Look in an application output window, messages there are deduced if connection of the slot with a signal wasn't possible.

cnbp173
12th September 2012, 21:05
Thanks.

I had that, but wasn't working. Must have got lost along the way.

Appreciate it.

R