QtMobility Reference Documentation

Contents

QML ValueSpaceSubscriber Element

The QValueSpaceSubscriber class allows applications to read and subscribe to Value Space paths. More...

  • List of all members, including inherited members
  • Properties

    Detailed Description

    The ValueSpaceSubscriber element is part of the QtMobility.publishsubscribe 1.1 module.

    Each ValueSpaceSubscriber element represents a single value or path in the Value Space. The path is set using the path property.

    Note that unlike the C++ class QValueSpaceSubscriber, the QML element has no default path. A path must be set before the subscriber will connect to the Value Space and begin receiving notifications.

     ValueSpaceSubscriber {
         id: nowPlaying
         path: "/applications/mediaplayer/now-playing"
     }

    The value is accessed using the value property.

     Text {
         text: nowPlaying.value
     }

    Property Documentation

    read-onlyconnected : bool

    This property holds whether the subscriber is currently connected to the backing store of the Value Space.


    path : string

    This property holds the base path of the subscriber, and is read/write.


    read-onlysubPaths : QStringList

    This property holds a list of known sub-paths of the currently set path.


    read-onlyvalue : QVariant

    This property holds the value of the key at the set path in the Value Space. Read-only.