PDA

View Full Version : Which signal is emitted when space bar pressed ?



npc
9th March 2007, 10:58
Hi,

Could you tell me which signal is emitted when a space bar is pressed in the QTreeWidget ?

Thanks,
*npc*

jpn
9th March 2007, 11:52
There is no such signal. You can

reimplement QWidget::keyPressEvent() to catch the corresponding key press event (or use an event filter)
create a QShortcut and bind it to the corresponding key
just a guess, but if you want to start editing, you may also modify QAbstractItemView::editTriggers()

wysota
9th March 2007, 12:07
I think that itemActivated() might be emitted pointing to the current item.

npc
9th March 2007, 12:40
There is no such signal. You can

reimplement QWidget::keyPressEvent() to catch the corresponding key press event (or use an event filter)
create a QShortcut and bind it to the corresponding key
just a guess, but if you want to start editing, you may also modify QAbstractItemView::editTriggers()


If there is no signal, How the checkbox related to that item is checked ?

Is there anyway to get a signal when a checkbox status changed ?

npc
9th March 2007, 12:40
I think that itemActivated() might be emitted pointing to the current item.

No itemActivated() signal is emitted when enter button is pressed.

wysota
9th March 2007, 12:51
If there is no signal, How the checkbox related to that item is checked ?
The widget handles that.


Is there anyway to get a signal when a checkbox status changed ?

You'll get an itemChanged() signal.