View Single Post
Posts: 44 | Thanked: 186 times | Joined on Apr 2010 @ Worthing, West Sussex, England
#4
Originally Posted by Grinchman View Post
fieldofcows, I want to say 'Thanks' you 1 billion time! =) It was really awesome! I did not expect such complete solution, I was tuned in for a long brainstorming, but You have saved my brains! Thanks, thanks, thanks!!! =)
You're very welcome!

There's one more problem you are going to encounter though which is that when you press the shutter button it will launch the standard camera app. I have found a solution to this but it's not the most elegant. If anyone knows a better way to solve this then I'd love to hear how.

My way involves stopping the camera-ui process when launching the app and restarting it on exit. The problem is that if your app crashes, camera-ui will not be restarted. Of course, your app (and mine) will not crash though...

To disable the default camera app:

Code:
QProcess process;
process.execute("/usr/sbin/dsmetool -k /usr/bin/camera-ui");
And to start it again:
Code:
process.execute("/usr/sbin/dsmetool -t /usr/bin/camera-ui");
 

The Following 3 Users Say Thank You to fieldofcows For This Useful Post: