Yes, please, someone please give a clear example of sucha basic thing anyone expects .....![]()
Yes, please, someone please give a clear example of sucha basic thing anyone expects .....![]()
How much more clear does it need to be? As Lykurg said, QSound can only play content from files on disk, it cannot play sounds encoded in the program's resources.
Qt Code:
//I know the following worksTo copy to clipboard, switch view to plain text mode
You need to give QSound the name of a disk file that has sound encoded in .wav format, and the file needs to be able to be found at run time - either it is in the program's current working directory or the location is specified using an absolute path (like the example above).
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
d_stranz (19th May 2017)
My mistake. I'm looking at the docs for Qt 5.4 and it doesn't mention resource files at all, only "sound files", and the examples in the docs use disk file names, not resource file names. So it seemed to me that the situation hadn't changed.Sorry d_stranz, You're wrong.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks