[Qt-interest] Moving through a QListView using D-Bus

Arnold Krille arnold at arnoldarts.de
Thu Feb 26 21:12:03 CET 2009


On Thursday 26 February 2009 18:59:11 Per Christian B. Viken wrote:
> The problem is that I can't figure out a way to move the current
> selection up and down without using the mouse or keyboard.
> So far I've tried faking a keypress, emitting a keyReleaseEvent with
> the correct event (Down released), but this doesn't seem to work.
> Also tried:
> curIndex = listView.currentIndex
> listView.setCurrentIndex(curIndex.child(curIndex.row+1, 0))
> which is executed, but only seems to deselect that which was selected
> with the mouse already. When nothing is selected, nothing happens.

Maybe you should take at look at the QItemSelectionModel 
(http://doc.trolltech.com/4.4/qitemselectionmodel.html) and control that via 
dbus...

Have fun,

Arnold

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090226/74d22b11/attachment.bin 


More information about the Qt-interest-old mailing list