[SailfishDevel] Application always active

Marcin Mielniczuk marmistrzmar at gmail.com
Sun Sep 22 11:19:55 UTC 2013


Hello,

I'm trying to utilze ApplicationWindow.applicationActive to set the cover
text. But the onApplicationActiveChanged signal isn't emitted, and the
applicationActive property is always true. (When I used an cover action
logging the applicationActive property, it was printed as true, even though
the app was minimized)

Some of the code;
main.qml:

> import QtQuick 2.1
> import Sailfish.Silica 1.0
> import BigText 1.0
> import "pages"
>
> ApplicationWindow
> {
>     id: appwin
>     initialPage: MainPage { }
>     cover: Qt.resolvedUrl("cover/CoverPage.qml")
>
>     Settings {id: settings}
>     property string bigTextFontFamily: (settings.fontFamily != "") ?
> settings.fontFamily : Theme.fontFamily
>     property string bigTextText
>
>     Component.onDestruction: console.log("quitting")
>     onApplicationActiveChanged: console.log("active = " +
> applicationActive)
>
> }
>

CoverPage.qml

> import QtQuick 2.0
> import Sailfish.Silica 1.0
>
> CoverBackground {
>     Label {
>         id: label
>         anchors.centerIn: parent
>         text: bigTextText
>     }
>
>     CoverActionList {
>         id: coverAction
>
>         CoverAction {
>             iconSource: "image://theme/icon-cover-next"
>             onTriggered: console.log(appwin.applicationActive)
>         }
>     }
> }
>

What am I doing wrong? Or is it a bug?
--
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20130922/c3eb3785/attachment.html>


More information about the Devel mailing list