using local server path in QML
Solved
General and Desktop
-
Hello,
I need to access to folder from my server with path:
//DGS1109N007/Echanges/Affichage/Display/Messages/
it working fine in c++
example:QFile::remove"//DGS1109N007/Echanges/soft/Kardex/Databases/4967df1f72da4cc275387bc5c81774de.ini");
but qml don't accept it with "file://///DGS1109N007/Echanges/Affichage/Display/Messages/image.jpg"
I try to create string variable with:
property string filepath:"//DGS1109N007/Echanges/Affichage/Display/Messages/image.jpg"
and do:
Image{ source:"file:///"+filepath }
but no success
I need to display an Image, how can I do it please?Thank you very much for your help
-
@filipdns said in using local server path in QML:
"file:///"
Did you get a chance to use the API Qt.resolvedUrl("file:///") method ? like follows.
source: Qt.resolvedUrl("file:///")
-
@dheerendra Hello, thanks it's working fine with:
property string filepath:"//DGS1109N007/Echanges/Affichage/Display/Messages/image.jpg" source: Qt.resolvedUrl("file:"+filepath)``` with Qt.resolvedUrl don't put /// after file: