QML ValueSpacePublisher ElementThe ValueSpacePublisher element represents a path in the value space where keys can be published. More... Properties
Detailed DescriptionValueSpacePublishers are constructed with a set path which cannot be changed. If you need to publish within multiple different paths, you will need multiple ValueSpacePublishers. For the keys within the path chosen, if the key names to be published are alphanumeric, they may be accessed through dynamic properties by setting the keys list. Example: ValueSpacePublisher { id: battery path: "/power/battery" keys: ["charge", "charging"] } MouseArea { onClicked: { battery.charge = 50 battery.charging = true } } Alternatively, for key names that can't be mapped to properties, or for key names shadowed by existing properties (like "value" or "path"), you can also access the value property of the Publisher itself. ValueSpacePublisher { id: nonalpha path: "/something/with a space/value" } MouseArea { onClicked: { nonalpha.value = "example" } } The ValueSpacePublisher element is part of the QtMobility.publishsubscribe 1.2 module. See also QValueSpacePublisher. Property DocumentationThis property is true if there are subscribers currently subscribed to the ValueSpace path being published by this Publisher. This property is read only. This documentation was introduced in Qt Mobility Mobility 1.2. Setting this property creates a set of dynamic properties allowing easy access to set the values of keys under this Publisher's path. This documentation was introduced in Qt Mobility Mobility 1.2. This property holds the base path of the publisher. This property is write-once -- after the first write, subsequent writes will be ignored and produce a warning. This documentation was introduced in Qt Mobility Mobility 1.2. This property can be used to force the Publisher to start the ValueSpace server (if one is appropriate on the platform) before the path property has been set. This property is write only. This documentation was introduced in Qt Mobility Mobility 1.2. This property publishes a new value to the ValueSpace at the path given through the path property. This property is write only. This documentation was introduced in Qt Mobility Mobility 1.2. |
Publicité
Best OfActualités les plus luesSemaine
Mois
Année
![]()
![]() Le Qt Developer Network au hasard![]() Compiler l'add-in Qt de Visual StudioLe Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.
CommunautéRessources
Liens utilesContact
Qt dans le magazine |
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtmobility-1.2 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com