Tabs on a status bar (on navi sub-pane of status pane)
-
Hi.
I have a question to you ,experts. How can i place tabs on a status bar of QMainWindow like it is shown on a figure (the tabs are placed right next to application name):
!https://lh5.googleusercontent.com/-qQ9WUFDQeL8/TooAZuA0w9I/AAAAAAAAAQc/dQkLYHA61Lo/status_bar_with_tabs.jpg(tabs on a status bar)!The following code doesn't work (the tabs are placed right below the status bar):
@
QMainWindow *mainWindow = new QMainWindow();QWidget *firstSubWidget = new QWidget();
QWidget *secondSubWidget = new QWidget();QTabWidget *tabWidget = new QTabWidget(mainWindow);
tabWidget->addTab(firstSubWidget, "first");
tabWidget->addTab(secondSubWidget, "second");mainWindow->setCentralWidget(tabWidget);
@I beleive that on Symbian it can be done using some standart way, many native symbian applications (like messages or clock) have tabs placed on the status bar exectly like it is shown.
I would be appreciated for any idea.
-
That picture does not load here.
-
[quote author="Andre" date="1317662840"]That picture does not load here.[/quote]
Thanks. Corrected -
After some investigation my question can be precised. Those part of the status pane (marked by arrow on the image) is called navi pane, and in Symbian SDK there is a Tabs API that allow create tabs on the navigation pane ("Navi pane":http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-771AF721-E2D7-41C8-BF97-5BD30D1A28AD.html). The question is how to access the navi pane in Qt or is there an access to navi pane from Qt at all?
-
I believe that you'll have to use the native API for that. As far as I know, Qt doesn't support that feature.
-
This should get you a pointer to the navipane:
@
#include <eikspane.h>
#include <aknnavi.h>const TUid paneUid = { aPaneId };
CEikStatusPane* statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
if (statusPane && statusPane->PaneCapabilities(paneUid).IsPresent()) {
CCoeControl* control = NULL;
TRAPD(err, control = statusPane->ControlL(EEikStatusPaneUidNavi));
...
//you can then cast the control to CAknNavigationControlContainer and try using it
...
}
@If you want to add QWidgets to the tab sheet - that will be tricky, since then you'd mix two UI frameworks (AVKON and Qt).
-
Hi Fuzzbender. Thanks for the help.
I'm thinking on folowing solution: using AVKON I'll add only tabs to the status pane, and additionally will cath the event of pressing navigation button. This is all from symbian API side. On the Qt side I'll add necessery widgets onto stackedWidget and use stackedWidget as central widget. The navigation button handlers (or slots) will be implemented in Qt and this slot will be responsible for displaying proper widget from stackedwidget.
Sounds to be possible.