In my program, I have a button that I want to open a text file in a relative directory. I'm using QDesktopServices like this:
QDesktopServices::openUrl(QUrl::fromLocalFile("file:///stuff/block_settings.txt"));
When the button is pressed, nothing happens.
The file is in a folder named "stuff" that resides in the same location as my .exe. It is the same directory used for all my other tasks.
What am I doing wrong?
Thanks.
I fixed the issue. Changed to:
Not sure how that works because I don't see that configuration on any tutorial anywhere but w/e
Seems like your full path is an overcomplication. I would suggest to use this intead:
So, you would be writing this code: