[SailfishDevel] QML Timer stops running

Thomas Tanghus thomas at tanghus.net
Wed Jan 15 19:18:57 UTC 2014


On Wednesday 15 January 2014 18:33 Oleksii Serdiuk wrote:
> On 15/01/14 18:31, Oleksii Serdiuk wrote:
> > On 15/01/14 13:16, Thomas Tanghus wrote:
> >>>> The reason for the 5-10 second wakeup is that I want to update cover
> >>>> until
> >>>> screen goes black, and I haven't found a way to detect that, and
> >>>> applicationActive doesn't do it. Maybe my search-foo looked for the
> >>>> wrong
> >>>> keywords.
> >>> 
> >>> Use Cover.status property:
> >>> 
> >>> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#sta
> >>> tus-> prop
> >>> 
> >>> Cover.Active - the cover is visible, and the user can interact with it
> >> 
> >> So (saying my covers id is 'cover') I could do:
> >>     property bool visible: cover.active || applicationActive;
> > 
> > Yes, this should work. However, I wouldn't recommend naming a property
> > `visible` because this will hide `visible` property of core QML Item
> > component and might lead to weird behavior.

Good point.

> One correction, though:
> 
> property bool visible: cover.status == Cover.Active || applicationActive

Didn't even see that. Thanks.

  property bool someName: cover.status === Cover.Active || applicationActive;

is a good trade-off for not seeing the time changing when peeking :)

I wonder if onSomeNameChanged is being triggered when waking up from
deep sleep.

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus


More information about the Devel mailing list