Simple questions OS10 BlackBerry

I have this code

/*
 * Copyright (c) 2011-2013 BlackBerry Limited.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "applicationui.hpp"

#include 
#include 
#include 
#include 
#include 

using namespace bb::cascades;

ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
        QObject(app)
{
    // prepare the localization
    m_pTranslator = new QTranslator(this);
    m_pLocaleHandler = new LocaleHandler(this);

    bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
    // This is only available in Debug builds
    Q_ASSERT(res);
    // Since the variable is not used in the app, this is added to avoid a
    // compiler warning
    Q_UNUSED(res);

    // initial load
    onSystemLanguageChanged();

    // 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);

    // Create root object for the UI
    AbstractPane *root = qml->createRootObject();

    Container *container = new Container();

    Image image = Image(QUrl("asset:///images/myimage.png"));
    container->add(image);

       root->setContent(container);
    // Set created root object as the application scene
    app->setScene(root);
}

void ApplicationUI::onSystemLanguageChanged()
{
    QCoreApplication::instance()->removeTranslator(m_pTranslator);
    // Initiate, load and install the application translation files.
    QString locale_string = QLocale().name();
    QString file_name = QString("MySecondApp_%1").arg(locale_string);
    if (m_pTranslator->load(file_name, "app/native/qm")) {
        QCoreApplication::instance()->installTranslator(m_pTranslator);
    }
}

I get errors in the container lines-> add (image);

root-> setContent (container);

How can I solve this problem? How can I organize photos in a container vertically, not horizontally.

Yop, the function does not exist.

Maybe you can try to read

How to create the UI with C ++.

https://developer.BlackBerry.com/native/documentation/Cascades/Getting_started/first_app/lightning_c...

or QML

https://developer.BlackBerry.com/native/documentation/Cascades/Getting_started/first_app/lightning_c...

Or you can use the findChild

Example:

QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);

// Create root object for the UI
AbstractPane *root = qml->createRootObject();

Container *container = root->findChild("container");
if (!container){
    qDebug() << "Error find container";
}else{
    Label label;
    label.setText("Works");
    container->add(&label);}

// Set created root object as the application scene
app->setScene(root);

Main.QML QML

import bb.cascades 1.2

Page {
    Container {
        objectName: "container"

    }
}

 

Tags: BlackBerry Developers

Similar Questions

  • BB Simple question classic blackBerry

    This is probably very simple... How can I change the color on the emails you write... I've implemented in blue which I think is standard... but who spend all the emails for black type... Please advise the steps required. Thank you

    Hi @medrealestate

    You can change the font color using formatting whenever you answer but you cannot change squarely so that it always uses a black font when replying. As it is the case I will capture your feedback for future review.

    Thank you!

  • BlackBerry Smartphones has simple question on volume of phone ringing.

    I am grateful for this forum because even simple questions like the following are difficult to obtain responded by Blackberry.  Seizing the issue in the 'Help' section on my handheld gives always nothing.  It seems that a large company like RIM would understand more in their user manuals.  Anyway, enough ranting... Here's the question:

    Quite simply, how can I increase the volume of the ringer on the phone?  By pushing the volume button for a call that increase the volume of calls.  Pushing not courts of appeal does nothing.  I'm sure that there is a way to do it, but I'm coming emptyhanded.

    Thank once again the community here as a whole for the excellent work which is made to help other Blackberry users.

    Profiles > advanced > highlight the profile you want to edit > press the menu key and go to 'Edit' > scroll down the list and find what you want to change the volume of the ring tone for example, standard messages

  • Simple question... How do to add pictures on the body of my MAILS found 1000 results for how can I add photos to my Thunderbird emails

    How can simple question - I add photos to my mail body. But instead of the answer - found 1000 results for how can I add photos to my Thunderbird emails. There are answers that don't apply at all to the question anyway. Why must it be so difficult to get a simple answer to a simple question?

    Thunderbird is a bit like Microsoft, all the reasons as I dumped MS Live Mail.

    First, a lot of help for Thunderbird refers to the menus that may not be visible. It would be useful to you and us if you have your menus and toolbars visible.

    http://chrisramsden.vfast.co.UK/13_Menus_in_Thunderbird.html

    Then, open a window of writing. Activate the menu and operate.

    Now that you see an option "Insert"?

    If this isn't the case, you can assign composing in plain text, which does not support embedded images.

    Tools | Account settings| {Select account} | Composition & addressing and ensure "Compose messages in HTML format" are checked. If it is not already checked, go back to writing a message. No better now?

    Once you have the mode of composition HTML goes, you can use Insert | Image or various permutations of copy - paste and drag - move to the body of your message.

    A manual of sorts: http://en.flossmanuals.net/thunderbird/composing-messages/

  • MacBook Pro (retina, 15 inches, beginning 2013) El Capitan 10.11.3, Simple question here: I can't open FinalCut Express (4, I believe). The wheel turns for hours. How can I install/uninstall and will I lose all my old films (for the most part stored on ex

    MacBook Pro (retina, 15 inches, beginning 2013) El Capitan 10.11.3, Simple question here: I can't open FinalCut Express (4, I believe). The wheel turns for hours. How can I install/uninstall and will I lose all my old films (for the most part stored on external hard drives). Thanks for your suggestions.

    You will not lose anything, but the app if you uninstall. If you decide to uninstall use this app to make sure that all the other files which depends on FCE are also deleted however I can't give you any assurance as to whether you will be able to reinstall so that it works correctly. It is a software that has not been supported for almost 5 years and there are conflicting reports as to its compatibility with OS X 10.11. Can't I test it myself.

    Maybe someone else will chime in with their own experiences.

    Russ

  • The simple question is "where can I find the installer for the HP Quick start?

    The simple question is "where can I find the installer for the HP Quick start?

    BESR regards

    Hello:

    And here's one for W8...

    http://h20565.www2.HP.com/hpsc/SWD/public/detail?swItemId=ob_140915_1#tab1

  • simple question to function test of value chain

    Hey guys,.

    I m just started using teststand.

    My simple question is related to the function "test string value '. What is the difference between the "type of comparison' CASE SENSITIVE and IGNORE CASE? From my point of view are not really meaningful names.

    To avoid simple and stupid questions like that, I tried to use the internal helper function. I'm wrong when I say that the help features are not as good as in labView? I couldn t find any answer to my question... hmmm... How other people handle this situation? (outside of just trying?)

    Thanks for your help

    Hello

    Case SENSITIVE: it will fail if you compare "HELLO" with 'Hello' or 'A' with 'a '.

    IGNORE CASE: this will pass if you compare "HELLO" with 'Hello' or 'A' with 'a '.

    Hope that explains

    Jürgen

  • I don't have to fix anything; I have just a simple question.

    I have just a simple question: what is maximum allowed data on Microsoft Outlook Express emails? Please, let me Know.Thank you.

    You should check with your ISP for this information. Your ISP mail servers dictate the maximum size of your mail more attachments. Outlook Express is simply a client program to encode, and send/receive binary data for you.
    Microsoft® Security MVP, 2004-2010

  • Simple question R61i Ultrabay...

    It's really a simple question, but I can't find the answer in any of the documents online.  I have a laptop Lenovo R61i 15.1 "widescreen, and I just need to know if it comes with a slot for Ultrabay Slim drive, a drive advance Ultrabay location or an other versions Ultrabay.  I would like to buy a long battery life to adapt to the Ultrabay box, but I see that the different Ultrabay models are not compatible, I want to know what one I need to buy for my computer.  Any help appreciated.

    widescreen 15.4 inch R61i like any other laptop R6x use housing Ultrabay Enhanced readers with EIDE interface and not the new laptop Rxxx SATA interface.

  • Simple question about the signing of the app

    Hello.

    I develop libraries to be used in other apps.

    It will be a cod file, its name will be added to the jad as a dependency.

    My library has access to the secure API (call of the browser), so I have a simple question:

    can I register only my cod library or application that uses my library is expected to be signed in too?

    THX.

    You should be ok just signature cod of the library, if your application uses any API secure. However, I just make a habit to sign everything just in case.

  • Create a group of users to ACS 3.3 - simple question

    Hello

    I have a simple question:

    How can I create a group of additional users at the ACS 3.3?

    I don't see the option to delete or create groups of users. Perhaps is it not possible?

    Thanks in advance

    All groups that you have already exist in the list of groups (0 to 499). To "create" a new group, just rename one of the unused existing groups and use.

    If you don't see the groups in your list, you must verify that you have access to see all these groups.

    Verifier check in the control of the Administration, select your admin user ID. In the second table below marked 'administrator', you will see the "available groups" and the editable section 'groups '. move the groups that you want to use available for editable.

    Present and then OU should be able to see these groups on your drop-down list in the section groups.

  • simple question: is the f2280 a printer/scanner wireless?

    Simple question: is the f2280 a printer/scanner wireless?

    This widget could not be displayed.
  • How can I add two very simple Questions to a slide?

    Hello

    I would like to be able to add two very simple questions to a slide, but don't know if (or how) this can be achieved. I've explained this more in detail below:

    ====================================================================================

    Scenario of

    The slide must contain two questions:

    Question 1: with two check boxes for the options Yes and No

    Question 2: with five check boxes for options 1 2 3 4 and 5

    A button (for example named Submit) to verify the responses from users by triggering a tip Action that verifies the radio buttons that have been selected.

    ====================================================================================

    The checkbox Widget looks like it could work for this scenario, because it allows each value to be assigned to a variable. However, when you try to put in place the tip Action I couldn't see all the variables I named in the checkbox Widget.


    If anyone has done this kind of thing before and can offer advice on the best way to create custom questions, I'd appreciate any help.


    For reference, I use 8 Captivate.


    Thank you


    Ross

    I indeed used interactions of checkboxes or radio buttons many times for this kind of slides. That's why I'm confused and I first want to know if you want an answer to the second issue as well? For the first question, it is clear that you need an interaction of option buttons, I don't know if you want to allow more than one choice for the second question. Only when you need to allow more than a choice will you have the interaction of check boxes, in the other scenario, option buttons will do the trick. It makes a big difference, because the radio button widget has only one associated variable that will store the selected element. For the widget checkboxes, you need a variable for each choice.

    Maybe my blog could help clarify, you can also download a descriptive table with all interactions of CP8 training

    Advice - Training interaction - Captivate blog

    BTW, I moved this thread to the Quizzing subspace.

  • Simple question about NVL

    Hello

    It's simple question on NVL, here are the details:

    create table tb_test (number (3) id, varchar2 (12)) nm;

    insert into tb_test values (111, 'AAA');

    Select NVL (nm, n / 'a') in tb_test where id = 222;

    I don't have "N/a", which is what I expected. Any comment?  Thank you!

    Hello

    If you want a row of output, even if the query produces no line; right?

    This looks like a job for outer join:

    SELECT NVL (t, nm, n / 'a') OUTPUT

    OF the double

    LEFT OUTER JOIN tb_test t ON t.id = 222

    ;

    LEFT OUTER JOIN ensures that each row in the table to the left (i.e. immediately before "LEFT OUTER JOIN") will join, even if the condtion join fails.  It is 1 row duplicate, therefore, if there is no line in tb_test that fills the 'id = 222' condition, that the double row will be in the game anyway.  If there is tb_test lines that meet the condition, they all appear in the result set.

  • How to choose a square Brush tool in CS6 brush?  Sorry if it's a simple question, but nothing has never been easy for me in Photoshop.

    How to choose a square Brush tool in CS6 brush?  Sorry if it's a simple question, but nothing has never been easy for me in Photoshop.

    Not sure CS6 about, but I know that CC has brushes square by default under all of the predefined settings. See catch with the toolbar options below:

    I don't think that hardness can be adjusted either so be aware of this.

Maybe you are looking for