Open file into an already running program
I've got a program setup to work with file opens (eg, movie.avi -> rightclick -> open with -> myprogram.exe) by reading the command line args when the program starts...
doesn't seem to extend to a way to open a file into the running instance of a program if i 'open with' while the program is already running, it just opens another copy of that program.
Does QT have a standardised way to handle this?
Hi, I had a similar problem, when a 2nd instance of my program is launched, I exit that and switch focus back to the 1st instance.
I solved it by using the QSharedMemory class in Qt to communicate between the 2 instances of the same .exe file.
@hskoglund Thanks, finally got a chance to implement it and QSharedMemory was exactly what I needed <3