[SailfishDevel] How to detect when an app are restored from minimized
Osmo Salomaa
otsaloma at iki.fi
Sat Jan 24 01:28:13 UTC 2015
24.01.2015, 01:04, Kim Foder kirjoitti:
> I believe this is because of the change where the context is freed when
> the app is minimized, so I added a call to var getContext("2d") to my
> onPaint event, and the app can paint on the canvas again.
I noticed the same, it changed with Uitukka/Qt5.2. Adding an
onContextChanged handler worked for me.
Canvas {
id: canvas
onContextChanged: {
if (!canvas.context) return;
// Initialize context properties here...
canvas.requestPaint();
}
}
--
Osmo Salomaa <otsaloma at iki.fi>
More information about the Devel
mailing list