Hi, again
here what i do to obtain a folder path
{
String paren,child; //put the final path in child
Object dt = mdir.data(i);
child = dt.toString();
while(par != null)
{
paren = par.data().toString();
child = paren +"/"+ child;
par = par.parent();
}
return child;
}
public String selected_file(QModelIndex i)
{
String paren,child; //put the final path in child
QAbstractItemModel mdir = ui.treeView.model();
Object dt = mdir.data(i);
QModelIndex par = mdir.parent(i);
child = dt.toString();
while(par != null)
{
paren = par.data().toString();
child = paren +"/"+ child;
par = par.parent();
}
return child;
}
To copy to clipboard, switch view to plain text mode
so, i want to show the files of this path in QListView with QFileSystemModel
but i don't know how this model works !!!!!
public void show_file(String path)
{
QFileSystemModel std = new QFileSystemModel();
std.setRootPath(dir.path());
ui.listView.setUniformItemSizes(true);
ui.listView.setModel(std);
}
public void show_file(String path)
{
QFileSystemModel std = new QFileSystemModel();
QDir dir = new QDir(path);
std.setRootPath(dir.path());
ui.listView.setUniformItemSizes(true);
ui.listView.setModel(std);
}
To copy to clipboard, switch view to plain text mode
but this function doesn't works °° 
thanks ...
Bookmarks