I'm making an app with QML/c++ first page with navigation pane is created with qml. Then the second page is also qml. On a button press of first page a c++ function is invoked and parsed the second page and have to push to navigation page. what I'm doing in button press is mentioned below.
QmlDocument *qml = QmlDocument::create("asset:///home.qml");
if (!qml->hasErrors()) {
Page *homepage = qml->createRootObject<Page>();
if (homepage) {
qDebug() <<"created a homepage";
navPane->push(homepage);
}}
But when pushing is done application terminates automatically giving an error.
console output is (created a homepage
Process 304619722 (Sampleapp2) terminated SIGSEGV code=1 fltno=11 ip=78f0a210(/base/usr/lib/libbbcascades.so.1@_ZNK2bb8cascades14NavigationPane7indexOfEPNS0_4PageE+0x707) mapaddr=0010a210. ref=00000010 )
I'm parsing the navigation page pointer to the second c++ file constructor and assigning it to a this->navpange variable.
Should I make navigation pane public in first c++ file header? if so how to do it?
Is there anyway I can get active navigation pane of running app from second c++ file without parsing it?
Thanks in advance :-)
Do I have to make the navigation