SOLVED: Need help launching external apps from qtdesktopplugin
-
Platform: Win XP, Qt Creator 2.0.0, Qt 4.7.0 (32bit)
I adding my own menu item to the grapher plugin example, to launch external applications.
The following code works, starts up Notepad with the specified file loaded:
QStringList args; args.append("d:/temp/readFileTest.txt"); process.start("notepad", args, QIODevice::ReadWrite);
When I change the start code line to:
process.start("acrord32");
I get a "Failed to start" process error. I have added the path to Adobe Reader into my PATH environment variable and can start the Reader from the command line using just "acrord32".
Why does it fail to start? Any ideas, suggestions, comments?
Thanks,
Gordon -
I just had a suggestion from a co-worker. He had to use short names in the paths in the make file, or he couldn't get examples to compile properly.
So, I put the short name path in for Adobe Reader and it launched!
The bottom line: Always use short names when specifying any directory or filenames to Qt.