Welcome!

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

Reply
Contributor
Posts: 25
Registered: ‎07-31-2013
My Device: Z10
My Carrier: Blackberry Developper
Accepted Solution

problem with loading of Qml page

Hi,

     i want to add Qml page to app and it loads when click on tab pane button. I apply the code but app struck at splash screen.

 

 

my code is:

 

TabbedPane {
                   sidebarState: SidebarState.VisibleFull

                   id: tab_pane

                  activeTab: tab_topup

 

         

Tab {
       title: "Tab name"
       imageSource: "asset:///images/otherImages/iphone-Icon.png"   
       NavigationPane {
       id: nav_pane4
       examplePage{

             id: examplePageId

     }

}
}

 

 

 

 

 

 

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: problem with loading of Qml page


Hi,


can u show what is inside examplePage.qml

TabbedPane {
    sidebarState: SidebarState.VisibleFull
    id: tab_pane
    activeTab: tab_topup
    Tab {
        title: "Tab name"
        NavigationPane {
            id: nav_pane4
            Page {
                Container {
                }
            }
        }
    }
    Tab {
        title: "Tab name"
        Page {
            Container {
            }
        }
    }
}

 It's working

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Contributor
Posts: 25
Registered: ‎07-31-2013
My Device: Z10
My Carrier: Blackberry Developper

Re: problem with loading of Qml page

Hi Brajesh Sanodiya,

                 Example page display  "Hello world" label.

Contributor
Posts: 25
Registered: ‎07-31-2013
My Device: Z10
My Carrier: Blackberry Developper

Re: problem with loading of Qml page

[ Edited ]

 

when i run this app in simulator, the console shows the error like below.

 

 

WARNING  bb::cascades::QmlDocument: error when loading QML from:   QUrl( asset:///pages/TabPaneScreen.qml" )  

 

--- errors: (asset:///pages/TabPaneScreen.qml:129:13: ExamplePage is not a type)

 

WARNING bb::cascades::QmlDocument:createRootObject document is not loaded or has errors, can't create root

 

 

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: problem with loading of Qml page

are u able to check preview of qml "TabPaneScreen.qml"???

I think u didn't import the package of examplePage.qml

check it
-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: problem with loading of Qml page

[ Edited ]

Try This


put the first latter in capital of qml page

rename "examplePage.qml" to "ExamplePage.qml"

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Contributor
Posts: 25
Registered: ‎07-31-2013
My Device: Z10
My Carrier: Blackberry Developper

Re: problem with loading of Qml page

 

Example Page is a Qml page, its not a package and  I use already existing  qml page it works fine.  But newly added page  is not working. 

 

Ex:

 

Tab {
      title: "Existing_page"
      imageSource: "asset:///images/otherImages/iphone-Icons.png"
      NavigationPane {
      peekEnabled: false
           id: nav_pane4
               ExistingPage{        //not allowed newly added page

             }

}
}

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: problem with loading of Qml page

have u checked with rename your qml page Name from "examplePage.qml" to "ExamplePage.qml" ??

and use

ExamplePage{

}
-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Contributor
Posts: 25
Registered: ‎07-31-2013
My Device: Z10
My Carrier: Blackberry Developper

Re: problem with loading of Qml page

Yes I am checked and renamed also,  but in same problem.  

 

Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: problem with loading of Qml page

Hi,

 

Could you please attach (minimal) versions of both pages?

 

Thank you.

--
Rob is no longer associated with BlackBerry.