09-04-2012 11:34 PM
Ah thank you Mr. Garret. I see now that I can use ActionItem to add items to the NavigationPane bar from a tucked away code snippet in the NavigationPane API reference. Although this isn't solving the problem at hand I will definitely be able to use this information, thank you.
Scott
09-05-2012 12:11 AM
To stay on topic: what would really be nice though is if I could see an example of how to load multiple QML files from C++. I have shown what I am trying to do with the code I posted above.
Scott
09-08-2012 09:49 PM
Ok, first thing's first, your main.qml would need to be a TabbedPane or NavigationPane in order to allow multiple pages to be displayed in a supported manner. After this is done you pretty much have all the code you need already:
Loading a QML file as a C++ Object:
QmlDocument *otherQml= QmlDocument::create("yourFile.qml");
QDeclarativeContext *qdc = otherQml->documentContext();
Page *page= otherQml->createRootNode<Page>();
Then to push (with reference to root if it is a NavigationPane):
root->push(page);
If you don't want to display an ActionBar this can be hidden, but hiding this and removing the native Cascades UI really does break the expected look and feel of a Cascades application.
Let me know if you have any difficulties implementing this.
09-09-2012 12:56 PM
I never considered hiding the ActionBar. Hiding the ActionBar will help to relieve some of the design constraints although it's not totally what I am looking for. Using NavigationPane as my root excludes me from using TabbedPane on later screens (please correct me if I am wrong). This is a bad design constraint to have.
Scott
09-10-2012 08:30 AM
Hi Scott,
Can you elaborate on where this constraint needs to be used within your application? There are options available other than a TabbedPane such as a Sheet, but first I'd need to know what your use case is.
09-10-2012 01:11 PM
09-10-2012 01:13 PM
Hi Scott,
Can you describe what you would like to have on the other Tabs? So if, for example, you have an image file opened in your app at a given moment, what would each of the Tabs include?
09-11-2012 03:19 PM
The files are essentially databases and the TabbedPanes would be interfaces with manipulating them. The tabs will be responsible for initiating a wide variety of tasks, but in general they will be used for:
- manipulating the UI (adding elements to screen, pop and push panes),
- saving data to persistent store
- making network calls
Thanks,
Scott
09-12-2012 09:28 AM
Could you provide info on the navigation paradigm being used? What would be housed on each of the panes?
This will help to understand the flow and then hopefully allow me to suggest some alternative approaches, or help generate a use case for a feature request.
09-15-2012 01:17 PM
Hello
Could you explain how add result QDeclarativeItem to Container (e.g.)?