Version number in the label (request for information)

Hey guys, I can't figure out how to make it work.

Here is my code:

application. UI

#include 

...
...
...
ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
        QObject(app)
{
...
...
   //version info
   bb::ApplicationInfo appInfo;
   setProperty("versionNumber", appInfo.version());
}

about. QML (where I try TSE it output)

...
Page {
...
    property string versionNumber: "0.0.0"
...
Label {
            id: lblversion
            text: qsTr("Version %1").arg(versionNumber)
}
}

That shows "0.0.0", but I want out of the real application version number.

Help would be appreciated.

Thank you

Here's the solution to this:

application.cpp:

...
#include 
...

    bb::ApplicationInfo appInfo;
    QString versionNumber = appInfo.version();
    // Create scene document from main.qml asset, the parent is set
    // to ensure the document gets destroyed properly at shut down.
    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    QDeclarativePropertyMap* appProperties = new QDeclarativePropertyMap;
    appProperties->insert("name", QVariant(appInfo.title()));
    appProperties->insert("version", QVariant(appInfo.version()));
    appProperties->insert("description", QVariant(appInfo.description()));
    qml->setContextProperty("AppInfo", appProperties);

QML:

text: qsTr("Version: %1").arg(AppInfo.version)

I would like to thank: knobtviker and anditsung

Tags: BlackBerry Developers

Similar Questions

  • Y at - it an easy way to have a version number that the code VI has access to, and which is used as the version number for the executable file and the installer builds?

    Y at - it an easy way to have a version number that the code VI has access to, and which is used as the version number for the executable file and the installer builds? Now whenever I update my software I need to change the global variable where I store the version number, and then when I build I have in hand, open the properties and change the version number for the executable file and the installer. Is there an easy way to make these as all corresponding automatically?

    Have you tried a search? This question comes up a LOT. Here are the results of a search: http://forums.ni.com/t5/forums/searchpage/tab/message?location=Node%3A170&q=application+version#mess...

  • How to display the version number of the application and the date of the last

    At the Express request User Guide under the heading "Application définition Attribute" description for the Version is as follows:

    Version includes the version number of the application on a page. You can also automatically link the version at the time of last modification by using the following format masks:

    YYYY. MR. DD

    MM DD. AAAA

    DD. MM. YYYY

    I have attempted to use various forms of alternative channels to display this information on a page without success, here are some of the things I've tried:
    and VERSION.
    and version.
    & APP_Version.

    And how would you present and the version number for the date of last modification date?

    Thanks for any help
    Ben

    The substitution of the #APP_VERSION model # seems to only be supported in Page header and footer definitions, not the body. (There are a number of restrictions where work substitutions, which are not well documented).

  • Where can I find the version number of the latest version of Firefox before downloading?

    I have to ask permission to download Firefox at work and he needs version number before granting approval. Texas regulators use Firefox and work does not allow microsoft to explore internet. I need Firefox to use the reports and models of agencies. The download Web site does not list the version number. Where can I find the version number of the latest version of Firefox before downloading?

    You can find the latest version of Firefox 20.0.x in all languages and for all systems operating here:

    If you put a download link, her you should see the version of Firefox in the pop-up at the bottom of the screen.

  • Purchase a new sealed copy of the upgrade of Windows Vista Edition diskette Home Premium. I found one on which the label says "for distribution in the United States / Canada only. Will this work without problems on a PC in the United Kingdom

    "U.S. / Canada Distribution only" disk for use in the United Kingdom?

    I want to buy a new copy sealed the Windows Vista Edition upgrade disk Home Premium. I found one on which the label says "for distribution in the United States / Canada only. Will this work without problems on a PC in the United Kingdom please? Thank you.

    Hello

    Yes, it will work. However I recommend to buy the disk to upgrade of the United Kingdom.

    The Windows Vista DVD upgrade that you get in the United Kingdom is different from what they get in the United States.

    Please follow the link menitoned.
    Choice of installation for consumer versions of Windows Vista (32-bit only)
    http://support.Microsoft.com/kb/932616
     
    I hope this helps.
  • How to increase the application version number in the eclipse runtime Android plugin

    I use BlackBerry Android plugin eclipse runtime to code sign my application. She is successful the first time, later I changed some code and code sign again and error

    Error: Code signing request failed because this file was previously signed.    .bar //dist/Android 2.3.1 ------.bar BlackBerry previously signed

    Then, I read a few post on this forum and find a version in .xml number must be increased to fix my mistake, but I can't find such a file and the version number in the eclipse project. He would be grateful if someone can tell me how to increase the version number in a project created by BlackBerry Android plugin eclipse runtime.

    You must edit the AndroidManifest.xml file you will find in the root of the project in Eclipse.

    Just increase the parameter 1 versionCode.

    http://developer.Android.com/Guide/publishing/versioning.html

  • How to automatically add the version number in the javadoc

    Can JDeveloper add automatically the version number to the javadoc for all project files comments when we commit the code to a repository, say SVN? Is it possible to do? Thank you.

    Hello

    JDeveloper, does not, but can of Subversion. You can use the special keyword ($Rev$) in your javadoc comment and then configure the properties subversion so that SVN which will replace with the revision number when you commit your changes. [url http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html] The docs for Subversion explain how to do this.

    John

  • Request for information on the BAM database

    Hello

    I have a few questions about the BAM database:

    1. when the entry is created in the BAM database, it's always an "Add" operation or it can be 'Update' operation also? (A new record is entered each time or sometimes old records are updated?).
    2. What is the difference between rucheDans, origActivityIn and waitActivityIn columns of the BAM_WORKLOAD table? Can someone provide a simple example to make a difference?

    Thanks in advance!

    Jean René

    1. the BAM database receives no updates and inserts. New lines are added when occur snapshots. The inside of the engine there is a setting (usually 24 hours) to the BAM database where the outdated information (lines) are removed from the database.

    2. the "rucheDans" represents the instance number of the current instance in the process.

    The "origActivityIn" column is almost always '1 '. When he is not this, then it means that the work item instance is sitting inside a subflow activity. The number in this column represents the instance number for the work item instance inside the begotten child sub-process.

    Similarly, the "waitActivityIn" is almost always '1 '. I have never seen that everything except "1". It is not documented anywhere I know, but I think that this instance of the child process respresents who number a Message wait activity waits for a notification. This can happen when a child process is created in a parent process asynchrously using process creation activity. The child can then in turn send a notification to the parent using an activity to send the Message.

    Dan

  • request for information on the database adapter...

    Hello
    I have a scenario where I have to interview a few tables that is not related to each other and I get different queries for each table. I tried to create a single DB adapter and imported from all the tables in it. But I faced two places where I was asked to define a root table and also to set up a select query.

    As a result of reagrding doubts, I have this:

    1. do I need to need to create different DB adapter for each table?

    2. What is the significance of the db table root?

    Concerning
    Lokesh

    Yes, you must create 3 links of different partner using the DB adapter.

    In theory Yes, you would create a new partner link using the DB adapter for each table that is not bound. If you want to select PO_HEADERS_ALL and PO_LINES, this can be done in a single call because they are related.

    This review is based on the fact that you select batch data, no data rows. If you receive 1 row of several unrelated table, this could be done via a custome procedure / package. I don't want to lead you down the wrong path, so I need to learn more about your use case. In most senerios in Oracle apps you call API / packages.

    If you could provide more information about your use case, I'll try to offer the best advice

    see you soon
    James

  • Include the version number on the Web site

    To check if the download site is the most recent version (it is often later than somw download sites) there is no version number to see before downloading. Iut can't appear on the download page (other languages) as is the case with Thunderbird

    For versions of Firefox on mozilla.org , that they are not late they just do not update until it is officially released for immediate release. Download sites randomly that Firefox 28.0 was before being taken the lead by entering the FTP as it can get pulled at the last moment.

  • who can tell me the most recent version number of the Client vSphere and vCenter.

    who can tell me the latest version number of vShpere customer and vCenter?

    The previous issue are the latest version (4.0U1).

    A way of knowing the last build number (for a version of Ux) is to check the download site (in the Download details):

    http://downloads.VMware.com/d/info/datacenter_downloads/vmware_vsphere_4/4

    For works build and see also version number:

    Version number and compile ESX

    André

  • Where can I find the version number of the ios 9.3 update before installing?

    Where can I find the version number of an ios update before installing?

    You can not. I would like to know as well. The current building is displayed in settings > general > all. When the phone offers you an update, it does not display the new version. One could assume that it is the latest available at that time, which at present is 13E237, but to my knowledge does not appear before the update.

  • Number in the United Kingdom for US residence questiuon...

    Online number cost the same thing with the same offers for UK and US numbers? Which means that if I get a number on another account, will also get the agreement holders USA online number down, such as the 50% when fits into an unlimited calling plan 12 months? Just curious, because I would like to get a number in the United Kingdom as well as my number online USA for my business, but I was wondering if the two the same cost for each of their subscriptions of perspective. Thank you.

    Yes the same number online reductions apply to all numbers online.

    About me You can also use an IP camera that your camera for Skype videoExample Instructions

  • How can I find the serial number of the "redemption code" for Photoshop12?

    I can't find the serial number for Photoshop12. I have a code redempion but the site comes from the circles autour and dates back to the original question. Help?

    Yes, I knew that. I actually couldn't use the redemption code to obtain the serial number of the product. Thanks for responding. I had the code works (after much frustration) and received the serial number.

  • Remove version number of the lower part of the screen?

    Using Apex 4.0.2. How to remove or display the version number that appears in the lower right of the screen in the application of the APEX?

    Thank you

    Salome

    Hello

    Will change your model page and remove the override #APP_VERSION #.
    It's probably in the footer template

    Kind regards
    Jari

Maybe you are looking for

  • Toshiba going drivers XP for Satellite P200D - 11L

    I have a Satellite P200D - 11L and waiting for almost six months for the official XP drivers. I'm starting to think that they are not released.My question is - does TOSHIBA intend to release XP drivers? And if no one here knows, could you tell me whe

  • Wenig im DataFinder in *.tdm Datenformat Suchergebnisse

    Hallo, Wenn ich in meiner Installation (SP1 10.1 DIAdem DataFinder 1.4.0.2854) mit dem Datafinder in Diadem-Datensatzen nach Regeln suche, habe ich sehr distinct results: Found werden Einträge in Dateien im *.dat Format sehr gut. (Datensatz-comments,

  • Pavilion m-6 (envy 14): the back takes off

    I've had this laptop for two and 1/2 years now. I really liked its software and the way it was designed, but last year (when I got 18 months) money back panel (IE. The back of the monitor) began to take off. I recorded it down to try and stop spreadi

  • When is Windows solves the problem of the development of Synaptics touch - I've had it for months

    Whenever I turn on my computer it comes up with an error on my paved Synaptics Enhancement - whatever and whenever Windows searches for a response and said they will allow me to know when they fix it, but it never gets fixed - what is go? Kind regard

  • Why I can't install Autocad in Windows 8?

    Original title: program I use Windows 8 (default OS in my pc - Samsung NP550P5C), but when the Autocad installation, Windows Installer V 5.0.9200.16384 box appears, and then the entire installation fails.