![]() ![]() |
Apr 1 2006, 03:02 AM
Post
#1
|
|
|
Group: Members Posts: 105 Joined: 3-August 05 Member No.: 7,766 |
Hi,
I assume I can use qcop for this but I wasn't able to find out how. I want to open a document (say "hello.html") using the default application as if I would double click on the file icon in the document tab. How do I do this? I guess something like qcop QPE/System '+++(QString)' hello.txt would do the job. I tried a view possibilities but all I achieved were interesting crashes. Any ideas? Cheers, Thomas. |
|
|
|
Mar 11 2007, 07:02 AM
Post
#2
|
|
|
Group: Members Posts: 454 Joined: 17-November 05 Member No.: 8,551 |
Yeah, well, your use of qcop is simply as a messenger, to tell the appropriate application it should open the file.
If you want textedit to open the file, then try something like (untested): qcop QPE/Application/textedit 'start(QString)' 'hello.txt' Use the qcoptest app I described at http://www.sdjf.esmartdesign.com/ipks/qcoptest.html to test your syntax without crashing. You also may need to google or search here for examples of successful qcop calls. I also found running strace to be quite helpful in figuring out the causes of crashes. Cheers, sdjf |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 05:20 PM |