No list to appear

I tried to reproduce the app stampCollector to create a list that I can put in my App. whenever I run well, I get a blank screen. I can't understand why but... Any help would be appreciated...

Here is my code:

hand. QML

import bb.cascades 1.0

TabbedPane {
    id: mainTabPage
    showTabsOnActionBar: true

    // Country Tab
    Tab {
        title: "Countries"
        NavigationPane {
            id: countryTabNav
            property variant _countryView;
            Page {
                Container {
                    ListView {
                        id: countryList
                        objectName: "countryList"
                        listItemComponents: [
                            ListItemComponent {
                                type: "listItem"
                                StandardListItem {
                                    title: ListItemData.country
                                    status: ListItemData.population
                                    description: ListItemData.capital
                                }
                            }
                        ]

                        onTriggered: {
                            var chosenItem = dataModel.data(indexPath);
                            _countryView = chosenItem;
                            countryTabNav.deprecatedPushQmlByString("countryDetail.qml");
                        }
                    }

                    //-- define tab content here
                    layout: StackLayout {
                    }

                }
            }
        }
    }
}

App.cpp

#include "app.hpp"

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using namespace bb::cascades;
using namespace bb::data;

App::App() {
    QmlDocument *qml = QmlDocument::create("main.qml");
    //-- setContextProperty expose C++ object in QML as an variable
    //-- uncomment next line to introduce 'this' object to QML name space as an 'app' variable
    //qml->setContextProperty("app", this);

    AbstractPane *root = qml->createRootNode();

    // ListView Model
    ListView *countryList = root->findChild("countryList");
    setupCountryListModel(countryList);

    Application::setScene(root);
}

void App::setupCountryListModel(ListView *countryList) {
    JsonDataAccess jda;
    QVariantList mainList = jda.load("app/native/assets/countries.json").value();

    if (jda.hasError()) {
        bb::data::DataAccessError error = jda.error();
        qDebug() << "JSON loading error: " << error.errorType() << ": "
                << error.errorMessage();
        return;
    }

    GroupDataModel *countryModel = new GroupDataModel(QStringList() << "country");
    countryModel->setParent(this);
    countryModel->insertList(mainList);
    countryModel->setGrouping(ItemGrouping::ByFullValue);

    countryList->setDataModel(countryModel);

}

App.HPP

#ifndef APP_H
#define APP_H

#include 
#include 

using namespace bb::cascades;

namespace bb
{
    namespace cascades
    {
        class ListView;
    }
}

/*!
 * @brief Application GUI object
 */
class App : public QObject
{
    Q_OBJECT
public:
    App();

private:
    void setupCountryListModel(ListView *countryList);
};

#endif // ifndef APP_H

countries. JSON

[
    {
        "country": "Canada"
        "capital": "Ottawa"
        "population": "23"
    },

    {
        "country": "India"
        "capital": "New Delhi"
        "population": "300"
    },

    {
        "country": "USA"
        "capital": "Washington D.C."
        "population": "100"
    }
]

Thank you

NVM, my JSON file has not been correctly implemented form.

Problems with work late into the night.

Tags: BlackBerry Developers

Similar Questions

  • try to use the dvd player & the usual list that appears is not, what can I do

    I'm trying to use my cd/dvd player to listen to music and there is usually a list that appears to ask me what to do and what is not, then, what can I do?

    Hello

    Try the microsoft 'fix - it' for your problem below

    http://support.Microsoft.com/mats/cd_dvd_drive_problems/en-us

    and read this information too

    http://support.Microsoft.com/kb/982116/en-us

  • Is it possible to convert the standard numbered list to the list that appears on the same line a right after another? As indicated in 1. Text goes here, 2. Text goes here, 3. Insert text here

    Is it possible to convert the standard numbered list to the list that appears on the same line a right after another?

    Instead

    1. Insert text here
    2. Insert text here
    3. Insert text here

    This

    1 text goes here, 2. Text goes here, 3. The text here.

    This revised list can take multiple lines.

    I use InDesign CC2014 - if that makes a difference.

    the only way is to convert numbered in the text (select numbered list > ctrl (or right click) > bulleted & numbered lists > convert numbered text).

    Then, with search - replace, you can change the paragraph returns in space (or in space by commas as in your example)

  • Enkitec vertical list Navbar appears momentarily

    Apex 4.2.0.00.27

    22.0 Firefox, IE 8

    Just started using the Enkitec Navbar, and we noticed that when a page is displayed a vertical list always appears momentarily before being replaced with the list of the navigation bar. It happens on all requests, we installed on, and each time a page is updated.

    I downloaded the demo on apex.oracle.com to demonstrate, but it happens so rarely there is not interesting to watch. I guess it's something to do with our (network installation of speed, put in cache?).

    If someone else has had this experience and overcome, I would be grateful for suggestions as to where we might start looking.

    Thank you very much

    Nick.

    Your suspicion about the speed and network performance are correct. What you see is a list of the items before the CSS applies to them.

    Wouldn't be an option to move your goods plugin in the filesystem (Web server)?

    What you do is to download all of the assets that the plugin uses (js, CSS, png,...).  Place them in your Web server.  Do not place them in the directory is, use a custom one as/c/navigation bar / (but use what you want)

    Go to the plugin, and then replace the prefix 'file' #PLUGIN_PREFIX # for "/ c/navbar /" so that the plugin uses them files form the file system.

    This helps because then the plugin doesn't have to get resources to the database whenever she makes.

    Thank you

    -Jorge

  • How to control "lists to appear on the Homepage.

    Is there a way to control that contains the list should be included in the 'lists to appear on home page' users list account page to view command? From now on, users will see 40 + public different lists that I don't want them to see. I tried to change it in account settings list access & order of the relevant provision.

    I know that users can manually delete lists by transferring them to the available lists. But I would do this for all users.

    Kind regards
    Allan

    Hello Allan,.

    Try using manage list and one option is to set the security on this list, be it private or Public. If it is private owner it will access. Try it and tell me if you face any issues. But the main constraint when creating that only you should select this option. After the creation, it is not possible to delete or made it as private. It is not possible to delete or modify lists in R17. It will be useful.

    See you soon
    Olivier

  • Drop-down list text appears garbled

    Hello

    I am new to LIveCycle. I created a form that works well with the exception of my drop-down list. I have everything I need on the drop-down menu, and everything seems OK when I preview, however, when I fill the form and print it in PDF format, drop-down list text which has been selected appears blurred with boxes!

    Help, please.

    Thank you, Joe

    Are you able to try another printer?

    If not try to delete the menu dropdown and adding it back - there are rare occasions where things get corrupted

  • Create a drop-down list object appears

    Hi guru,.

    We are facing a problem with our 10gR 3 Oracle WCI portal.

    We have several groups of community administrators in which administrators of the community will be added. These groups have rights activity like creating portlets, create the snapshot of search, etc. associated with them, allowing administrators to the community different create their own items to the community.

    It worked very well until somedays back, however we have noticed that now, if we add a person to one of these groups of administrators of community, the drop-down list CREATE an OBJECT does not appear under the Division of Administration for the administrators of the community.

    Please can someone help us with what we face serious flak from the directors of the community.

    on the top of my head check that the Group has rights to this folder. If they have no administrator rights on this admin folder they won't see the drop-down list of objects create... try and post a reply.

  • Why does my ordered list not appear correctly?

    None of my bulleted lists are displayed correctly.  I use the manual tutorial Dreamweaver revealed, and I use the css that comes with the book, so I did not design their...

    But this kind of work will tell me to make an unordered list, but give me css that will not display correctly?

    What happens is that when I format a list in a unordered list, all elements are indented together as a single element, and there is no miracle.  In addition, the ordered lists are the same.  Someone has an idea, what happens?  To give an example:

    Seasonal gardening checklist

    Fall - time to plant trees and spring-flowering bulbs. Take the time to clean the leaves and dead foliage of your beds and lawn. Winter - time to prune fruit trees and plant your bulbs finish. Don't forget to water the saplings when the soil is dry. Spring - time to prepare your beds, annuals and spread fertilizer for established plants. Don't forget mulch to conserve moisture and prevent the growth of weeds. Summer - time to complete precipitation so that plants get an inch of water a week. Plant your vegetable garden and enjoy abundant harvests until the end of autumn.

    This is what looks like the list, but every word in bold is supposed to be a smart element.

    What I ended up doing was, I just made a new class selector: .menulist, which sets the display to inline, and I applied it to all list items in the .menu_bar.  It was a bit tedious, but it worked.  Thanks for the help everyone!

  • I can't get my (before opening) incoming e-mail list to appear.

    I must have hit some wrong button because I can't go back to my opening list emails (no-deleated) screen. There are tabs across the screen from the top view of (now big screen), which represent a bunch of old, perhaps archived by year, emails. Hitting the tabs brings up that the e-mail message, and none of the tabs seem to come back to me to my regular opening screen. Closing of Thunderbird does not reset anything, and turn refers to the email previously on the screen, not the opening list screen.

    Go to the leftmost tab, right click on the tab to the left - close other tabs

  • Inbox appears twice on the IMAP subscription list

    Hi, I'm looking to install a Fastmail IMAP with Thunderbird account and all records are recognized with the exception of the Inbox, which is grayed out. I noticed that on the subscription list, it appears as "INBOX" and even "Inbox", and here again, they are grayed. I have been successfully using Fastmail and Thunderbird with another account, and on that one, the subscription list has only when the entry, "INBOX", so I guess the problem is that the presence of an additional Inbox entry is messing things up. It is probably a problem on the end of Fastmail, or is there something I can adjust to get rid of the other entry? Thanks in advance.

    Hi Matt, sorry for not responding earlier. Your proposed change stop Thunderbird to detect all mailboxes on the IMAP, so it was not a success. However, there is one detail I disagreed because I didn't know it was important: The Fastmail account had folders inside the Inbox. After that I moved to a folder archive separate, Thunderbird has been able to recognize everything, so * that * was clearly the source of the problem.

    Thanks again.

  • When I double click on the Firefox search bar, a list of recent websites I have visited appears although the history is cleared - how can I stop this?

    Above is clear

    Does the location bar drop down list?

    If so that's the list that shows when you start typing in the address bar or from the list that appears if you click on the arrow down on the far right?

    It displays a list of Web sites that you typed or pasted into the address bar.

  • How can I find a list of the modules installed in FF5? (the one I'm looking for is installed, but does not appear in the Extensions, appearance or Plugins)

    I installed an add-on that would allow me to change the content of the context menu. It works like a charm and I want to make a donation to the person who developed it, but I don't remember his name and I don't know how to find a list of the Add-ons I have installed. I checked the lists that appear when you go to the Add-ons under appearance and Plugins, Extensions Manager, but he's not here. Any help would be much appreciated.

    A lot of extensions change several context menus.

    The Menu Editor extension allows to rearrange and hide items in the menus, even move items between menus (be careful with moving between menus.

    You can get a list of your Extensions in a playlist by help > troubleshooting or typing information on: support in the bar of addresses in Firefox 4 and above. Note that your extensions disabled your addons list may appear after those who have been activated.

    Please mark "resolved" a response that will better help others with a similar problem - hope it was her.

  • List of buddies not appearing is not in the Messages application

    I have set up internet accounts under system preferences and these accounts appeared in the Messages application. However, the buddy list does not appear in the sidebar. The option "Show all my accounts in a list of contacts" option has been checked in the General preferences. In addition, "Show all pictures of contacts in conversation" option has been checked under the drop down menu to "View". Always the buddy list has not appeared. How can I get the list to appear?

    Thank you.

    OS: Mac OS X El Capitan

    Using Messages 9.1 (5085)

    The help of the Message:

  • Subforms appear depending on a drop-down list selection

    I need several subforms to appear in function which is selected from a drop-down list. I've specified 7 item values, if the person chooses the item 1, I would like to point 1 subform to appear.

    If the person chooses point 2 or 3 point as well. I would like to both subforms to appear.

    How can I do this?

    I also, for items for does not appear on the once selected drop-down list. I know that JavaScript will appear in the case of "change."

    I need help!

    Thank you

    Hello

    I have created an example of what can be found here

    Based on what you have asked, I made a simple example with 2 subforms. If the option of the subform drop 1 will be shown then if you select drop-down list will appear 2 2 subform

    I also added checkboxes as an alternative method.

    See the example in

    http://www.dubdubdubdesigns.co.UK/LiveCycle/show-hide_subform.html

    Concerning

    Graham

    DubDubDubDesigns.co.uk

  • Create an email sign up form that appears in a list of search engine &gt; &gt;

    How would we go about creating a registration form email that appears in the list of links generated by a search engine after a search (as shown in the image below)? Has this been done before? I really like the lists that appear after the page of search results that allow the user to navigate through the different parts of a site from the search is there a way to implement a form that appears in one of these lists of registration E-mail?

    Picture 1.png

    I'd like to see a blank text box somewhere to the right of the list of page that says "insert email here" with a sign to alert button to the right... for those who search my site can sing for email alerts quickly and easily from the results page search engine. I would like to sign up for updates by email from the list. just like they can navigate my page by clicking on login / account summary / contact us excrement, it may be easier to click on the register button, I have their information, their finished, everybody happy.

    However you don't need a dedicated server. Shared is fine. Google is only reading the links in the code.

    John,

    Can you give me an example of a site on the hosting that displays in columns under the www.domainName.comsite links?

    Getting back to the original question of Scotty, Google will not collect and process electronic registrations for you.  It is not their business.  Then no.  You cannot add a form input field Google or any other SERPs.  At best, they can put a link to the page on YOUR SITE that contains the electronic registration form.

    Nancy O.

Maybe you are looking for