Is there a navigation tab bar? And what is Application Tab in the Simulation doing?
I want to be able to create a Navigation Tab bar (like in IOS) and control the display of multiple views with back and forward buttons on this Tab bar.
I found an example call QstackedWidgetExample, that claims to enable you to put multiple views in a stack and control when the views get displayed with Menu Buttons. I run this example, but I don't understand what I am seeing because it doesn't make sense. I am using the latest Qt Creator IDE. The Simulator has a tab called Applications which has the following labels: Topmost widget's title and Application's menubar.
And in the Application's menu bar it shows the "menu buttons" that control the display of views from the QStackedWidget stack object.
Why in the world are these menu tabs shown in this Simulator Application tab? Why isn't the menu bar with its menu tabs showed inside the simulated Symbian device?
This is not the way the application is going to look like in the physical device, so can someone explain what is going?
Also I read something about Symbin C++ having a navigatePane class, it sounds like what I am looking for, so is there something similar in the latest Qt SDK 1.1. ?
Can you be more specific about what you want to achieve please? I am not familiar with iOS. Can you post an image or mockup of what you want to do?
Sure, here is a snapshot of an example of the type of application I want to write. See attachment. The "Navigation" bar in IOS is the top horizontal bar, where you see from left to right: the search button, the title "Tasting Notes" and the right button "Edit". So if i click in one of the List items, like "Wine Notes", a new "VIEW" is shown on the next screen shot. In this new View, the title is now the name of selected Item "Wine Notes" and the button to get back to the previous "View" (left button on the navigation bar) becomes the title of the "previous View". IOS uses a "stack data structure" to keep track of the title of the "Views" being selected so that it can label the "back" and "forward" buttons (left and right on navigation bar) accordingly.
In any case, I would like create a navigation bar just like as well as the list and be able to control with the items list when I display a new View, just like in this example. I think the QStackedWidget allows you to control a stack of "views" , or what in Qt language would be a stack of "widgets". Would be nice to have an example similar to what I just shown in C++ using the Qt sdk to speed up my process.
Also as I mentioned before, I am a little confused by the Application's tab bar in the Simulator. I have no idea why the Menu Bar Actions in the QStackedWidgetExample application are shown there and not in the actual simulation screen in the Creator IDE. Can you explain this if you know?
Forgot the attachment. It looks like this wiki doesn't allow one to attach documents. But here is a link where you can find the same screen shots of the app I am talking about.
Scroll down to the end.
Do you want to make something something like this in QML, using widgets, or using QGraphicsView items? All three are options, but all three are going to take a bit of programming to get to where you want. Unfortunately, there are no ready-made components (that I know of) that provide everything you need out of the box, but it is also not like it is very hard.
I do think that a component like this belongs in Qt Quick as a component, and that it should provide the nice animations like the ones you get on iOS by default.
Which is the fastest method to use?. I don't know QML, but I suppose i can spend two hours learning it and using it. It seems though that QML handles the graphics and not the logic, so I will have to write some C++ anyways?
Or I could use just the Widgets given in the SDK, write everything in C++ and get a rough cut of what I want?
I don't know about QGraphicsView, but I will check it out.
Also, what do you think of the QStackedWidget component , it seems like I can push and pop different views (widget containing components for one type of screen) using that stack. So I was thinking of writing everything in C++.
It really depends on what you want to achieve exactly. QML was created to facilitate the construction of highly dynamic, custom UI's: lots of graphical elements and animations, and often intended for touch interaction. It is build on QGraphicsView, although it does more than that, of course. You can, and in cases, must combine QML with C++, but it all depends on what you want to do.
A QStackedWidget with a another widget on top of it to create the actual title bar can of course supply what you need, but it will be hard to make that animate nicely. If that is not a requirement, then it would certainly be possible to use it for your purpose. Every page would become a widget on the stack. With a bit of custom code, you can easily keep track of the last used page and make sure you get an updated title.
What the best approach is, depends on your requirements in terms of look and feel, mostly. If you want to be platform compatible and don't care that much about animations and things like that, then QWidgets are very good. If you care about pixel-perfect custom UI's and lots of animation, then look into QGraphicsView or QML/Quick.
Thanks a lot Andre, that was a very helpful answer.