Qt 6.12 LTS is out! See what's new in the release
blog
QSortFilterProxyModel - get root path
General and Desktop
3
Posts
2
Posters
1.8k
Views
1
Watching
-
How can I get the root path of a QSortFilterProxyModel that uses QFileSystemModel as its source model?
I tried the following in an QSortFilterProxyModel-based class but it does not seem to work:
@
((QFileSystemModel)sourceModel()).rootPath()
@ -
I tried but I cannot seem to get the string rootpath correctly. Thus I connected a slot to the rootPathChanged signal for the QFileStringModel and set a QString rootPath variable I delcared.
@
void MainWindow::fsModel_rootPathChanged(QString str)
{
m_checkProxy->rootPath = str;
}
@NOTE: still don't know why I was unable to get it using the rootPath
Thanks for your response...