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. How to make tabs expanding???
Forum Updated to NodeBB v4.3 + New Features

How to make tabs expanding???

Scheduled Pinned Locked Moved Mobile and Embedded
32 Posts 3 Posters 25.6k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    alfah
    wrote on last edited by
    #20

    i found out somethin else too,

    In the simulator, if you use Maemo Fremantle, tabs are aligned center or pushed to the left. But if nokia symbian^3 simulator is used, the same problem occurs, the tabs are placed a bit off from the screen's left end.

    P.S printscreen of the simulator??

    alfah

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #21

      the symbian^3 of course that's the one for your c7. The Maemo Fremantle is for another device.

      But now we are a step forward. We know for symbian^3 simulator AND the device it is not working as expected.
      I will test with the symbian^3 simulator myself. Maybe this is not possible due to style restrictions on Symbian^3.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • EddyE Offline
        EddyE Offline
        Eddy
        wrote on last edited by
        #22

        I think the reason why we cannot set the first tab aligned to the left is because there is space reserved for the arrow.

        You will have to experiment with the stylesheet settings untill you find something pleasing.

        At least we know we shouldn't make a bug report as I suspected earlier.

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alfah
          wrote on last edited by
          #23

          :)

          I too came up with the same conclusion:). cuz when i increase the size of tabs, it kinda fits the whole things along with the arrow.
          sometimes I feel Qt and symbian is not flexible :(

          Im still fiddling with the tabs and tabbar though :)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alfah
            wrote on last edited by
            #24

            i found something like this in the docs

            expanding : bool
            This property holds when expanding is true QTabBar will expand the tabs to use the empty space.
            By default the value is true.
            This property was introduced in Qt 4.5.

            Access functions:
            @
            bool expanding () const
            void setExpanding ( bool enabled )
            @

            could you tell me how to use it??? Its said its set to true by default. jus giving it a try

            alfah

            1 Reply Last reply
            0
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #25

              have a look at "this thread.":http://developer.qt.nokia.com/forums/viewthread/2879
              They didn't succeed however.

              the setexpanding function is protected so you will have to subclass.

              Qt Certified Specialist
              www.edalsolutions.be

              1 Reply Last reply
              0
              • A Offline
                A Offline
                alfah
                wrote on last edited by
                #26

                ahh k. another vain try.

                so inshort i cant solve it jus like that. So can i tag this as "Unsolvable" ??? :D

                1 Reply Last reply
                0
                • EddyE Offline
                  EddyE Offline
                  Eddy
                  wrote on last edited by
                  #27

                  I didn't say it's unsolvable. I just said we will have to try with subclassing QTabBar.

                  Qt Certified Specialist
                  www.edalsolutions.be

                  1 Reply Last reply
                  0
                  • EddyE Offline
                    EddyE Offline
                    Eddy
                    wrote on last edited by
                    #28

                    I found a solution on "Stackoverflow":http://stackoverflow.com/questions/5133846/qt4-expanding-tabs-in-qtabbar.

                    Obviously the -expanding- setExpanding function divides the available space like this :!http://dl.dropbox.com/u/33544011/tabbarExpanding.PNG(Tabbar expanding)!
                    There is always space left over on the right for another tab. Could you use that?

                    If not you will have to live with the styles provided by your device.

                    Qt Certified Specialist
                    www.edalsolutions.be

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      alfah
                      wrote on last edited by
                      #29

                      is there a function called expanding??

                      I had made a quick search in Stackoverflow last day and found something like this of which i could not make head or tail of it

                      http://stackoverflow.com/questions/2145983/qt-making-ui-that-shrinks-and-expands

                      alfah

                      1 Reply Last reply
                      0
                      • EddyE Offline
                        EddyE Offline
                        Eddy
                        wrote on last edited by
                        #30

                        no I meant setExpanding sorry. I edited my post.

                        But you didn't anwer my question :
                        There is always space left over on the right for another tab. Could you use that?

                        for the setTabIcon question see your "other post":http://developer.qt.nokia.com/forums/viewthread/8399/P30/#50381. please don't double post.

                        Qt Certified Specialist
                        www.edalsolutions.be

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          alfah
                          wrote on last edited by
                          #31

                          well,

                          technically, set expanding should expand the tabs right, so wont it cover up the space on the right????

                          alfah

                          P.S i have removed the double post

                          1 Reply Last reply
                          0
                          • EddyE Offline
                            EddyE Offline
                            Eddy
                            wrote on last edited by
                            #32

                            bq. technically, set expanding should expand the tabs right, so wont it cover up the space on the right????

                            Yes, we could expect that, but the Trolls decided to do it otherwise. I can imagine people like it like that to give a hint to the user he can add tabs using the program...

                            You could make a suggestion on the "bugtracker":https://bugreports.qt.nokia.com.

                            Qt Certified Specialist
                            www.edalsolutions.be

                            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