How to set focus to file list box in QFileDialog
-
I only have six keys (up,down,left,right,Esc,Enter) in my app, there is no mouse. Now I need to open QFileDialog, use keys to select the file I want to open, so I have to set focus to file list box first after I open QFileDialog, but I have no idea to set focus in QFileDialog. Any help, please. Thanks a lot.
-
"setFocus":http://doc.qt.nokia.com/4.7/qwidget.html#setFocus-2 can be used with QFileDialog. Or do you have to navigate from another widget to your file dialog using these 6 keys?
-
Are you really sure you want to use QFileDialog and not a custom build file selection dialog?
-
I know setFocus can be used with QFileDialog, but focus is just in file name box, can't be moved to file list box. I try to build file selection dialog, but how to get all files name under specific directory? Thank you.
-
QFileSystemModel is a good place to start; you can combine it with any of the Qt item views.
-
Thanks. I'll try it.