05-12-2014 09:14 AM
Does anyone know how to create a signature capturing function? Basically something that will allow the user to doodle a signature with their finger on the screen of the phone and save it as a picture. I did some googling and the closest I got to a solution was some code for capturing finger strokes in a Rectangle element in QtQuick 2.0, sadly all I have to work with is QtQuick 1.1 with no Rectangle element support.
I was thinking of using a WebView instead and the html5 canvas element as a possible solution, but before I go down that avenue I'd like to see if someone has already discovered a functional solution.
05-16-2014 06:24 AM
If you're looking at a native/QML solution you might take a look at the QML control: ForeignWindowControl. It allows you to "punch" a hole through to the Screen Graphics Subsystem.
Essentially it allows you to get a screen context and screen window from the underlying graphics system and then interact with it. You can use OpenGL ES for example and set up a rendering surface on it to draw and capture screen events.
There's a simple example here:
that demonstrates how to use that control.
05-18-2014 08:02 AM
I think using webview with Canvas is the simplest way to make your signature function work.
If you want more detail information, I can provide a sample project with Webview drawing wrapped in Cascades UI.