Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Tabs on a status bar (on navi sub-pane of status pane)

Tabs on a status bar (on navi sub-pane of status pane)

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 4 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    panamerr
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      That picture does not load here.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        panamerr
        wrote on last edited by
        #3

        [quote author="Andre" date="1317662840"]That picture does not load here.[/quote]
        Thanks. Corrected

        1 Reply Last reply
        0
        • P Offline
          P Offline
          panamerr
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mlong
            wrote on last edited by
            #5

            I believe that you'll have to use the native API for that. As far as I know, Qt doesn't support that feature.

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Fuzzbender
              wrote on last edited by
              #6

              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).

              1 Reply Last reply
              0
              • P Offline
                P Offline
                panamerr
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved