QFile, accessing samba shares using password (on windows)
I need to read a file in a samba server using username and password.
To read the file in windows I use the following address:
it ask me username and password and I can read the file.
If I use this:
it can't read the file because of authentication.
How can I pass username and password to QFile to access the file?
Good, question have you find a solution?
I used a public share (without password).
I don't think Windows allows access to remote shares using the C/C++ API, you probably have to go through WinAPI calls for the SMB protocol. You can implement a QAbstractFileEngine for it and use it with QFile then. But I don't think a ready to use solution is available right now. And you can check if this about passowrd on Windows can help