[Qt-interest] Moving through a QListView using D-Bus
Per Christian B. Viken
perchr at northblue.org
Thu Feb 26 18:59:11 CET 2009
Hi.
I'm currently using Qt4 with Ruby to see if I can build a small media
launcher I can use via my remote. It basically displays a giant
QListView on the entire screen, using a QDirModel to get files and
folders. I figured that the easiest way to make LIRC and the
application talk was using D-Bus, but if another solution works
better, I'm open to suggestions.
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.
(I'm not very familiar with Qt at the moment, but I have searched
through the API without finding much that works. Figured I should try
with Ruby first, since I already know that, and avoid fighting with C+
+ and Qt at the same time. Then learn C++ later on.)
More information about the Qt-interest-old
mailing list