Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 20
Registered: ‎02-21-2012
My Device: Bold 9900
My Carrier: AT&T

Access Sheet loaded from attachedObject

[ Edited ]

I have two QML files: main.qml and addData.qml. "addData.qml" is a Sheet, and main.qml has a button that opens the sheet through attachedObject. "addData.qml" has a signal sending an integer back to main.qml and then to the main CPP class.

The purpose is to dynamically update the sheet.


The QML:

Page {
    Container {
        objectName: "mainContainer"
        layout: DockLayout {}
        Button {
            property variant addSheet
            // removed
            onClicked: {
                // Create the add sheet and connect to its signals.
                // removed
            attachedObjects: [
                ComponentDefinition {
                    id: addGameSheet
                    objectName: "addGameSheet"
                    source: "addData.qml"
// removed } } function addDropDowns(index) { main.setSelect(index); } } The C++: void TennisScoreKeeper::setSelect(int index) {

// This is found Container *main = root->findChild<Container*>("mainContainer");

// This is the componentDefinition, but it doesn't help me. QObject *componentDef = main->findChild<QObject*>("addGameSheet");

// This doesn't work. The ComponentDefinition loaded the sheet though Sheet *sheet = componentDef->findChild<Sheet*>("addSheet");

// This doesn't work because sheet doesn't work Container *container = sheet->findChild<Container*>("scrollViewContainer"); } } }