Nominate our 2022 Qt Champions!

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):
    ! 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");


    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": 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.

Log in to reply