Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
How do I get the complete file path of the file selected by the user
This post is deleted!
I already asked you on stackoverflow - when you fill the list you should know where you get it from / what's the path where they're coming from - so add it afterwards again.
@Christian-Ehrlicher yea the list shows the files in a specific resource file, this is the code for the list
QDir dir(":/entertainment /files");
for (const QFileInfo &file : dir.entryInfoList(QDir::Files))
QListWidgetItem *item = new QListWidgetItem(file.fileName());
JonB last edited by
So what is the question?
@JonB i want to get the url of the resource file that the user selected from the list of files
JonB last edited by JonB
Do you want to tell us what your
file.absolutePath()produced, or leave us to guess?
:/entertainment /filesfollowed by
file.fileName()that you want, no? [EDIT: Since I copied & pasted your code, I notice you have a space in that literal path: I doubt that is correct?]
What do you think you are going to do with a URL that points into a resource file?
The file.absolutepath gives me the file path of the project file location and it is not what i want just something i tried to get what i want
I am developing a media player, i want to get the url so that i can use that url to direct the media player to that location to play the video
I am sorry if i am not clear with my question I am new to Qt and doesn't have much experience with it
and it is not what i want just something i tried to get what i want
Please re-read this and try to understand yourself what you want and what you want to tell us with this.
i want to get the url so that
Which media player?