Thank very much... but my list still empty 
I've post a compilable project.
The empty list is called lstFileRemote ( le right treeview )
The bugged model RemoteModel
The List is populated in this method (from a ftp connection) :
void MainWindow
::addToList(const QUrlInfo & urlInfo
) { RemoteModel::FileList addMe;
addMe.name = urlInfo.name();
addMe.
size = QString::number(urlInfo.
size());
ftp_model->insertRows(0, 1);
ftp_model
->setData
(ftp_model
->index
(-1),
QVariant::fromValue(addMe
));
}
void MainWindow::addToList(const QUrlInfo & urlInfo) {
RemoteModel::FileList addMe;
addMe.name = urlInfo.name();
addMe.size = QString::number(urlInfo.size());
ftp_model->insertRows(0, 1);
ftp_model->setData(ftp_model->index(-1), QVariant::fromValue(addMe));
}
To copy to clipboard, switch view to plain text mode
Bookmarks