How to list all the files/folder in a direcotry in QlistWidget?
How can i list all the files and folders of a directory in the QlistWidget. LIke i want to list all the files and folders in /media/USB folder.
And also i want to know how can i capture the double click event of a item in a QlistWidget. Because i have two QlistWidget,in one widget directory path is shown and in another widget i want to list all the files/folders when i select the directory path from first widget. Please provide code example if any.
Re: How to list all the files/folder in a direcotry in QlistWidget?
Best would be using QFileSystemModelwith QListView.
Check the documentation for examples. You can also refer Qt Demos for the Dir View example
Re: How to list all the files/folder in a direcotry in QlistWidget?
And what about the event capture when a particular item is selected in the list view?
Re: How to list all the files/folder in a direcotry in QlistWidget?
Read the model and view classes in assistant.
Check out their signals.