How to load file when program opens
I created a unique file extension, and I want the user to be able double click on their saved file and the program automatically opens and loads it. How do I do that?
I imagine this would use the argv value in main? But I have no idea how it would be done.
Re: How to load file when program opens
The file extension you must "register" from the OS to open with your program (i don't know how you can done this from your application - maybe the installers have some options for that, since the installer knows where the user installs your application) and then the double clicked file name (and path) will be sent by the OS using the arguments (int argc is the number of arguments and char** argv are the argument strings, also QCoreApplication has functionality that returns arguments in a QStringList (the first argument is the exe name and path).