Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. [SOLVED] Help on QTabWidget

[SOLVED] Help on QTabWidget

Scheduled Pinned Locked Moved India
13 Posts 5 Posters 6.0k 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.
  • M Offline
    M Offline
    M_31
    wrote on last edited by
    #4

    Yes the same... i want to do the same thing from my main window at runtime..

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #5

      Then you have to fully inmplement it on your own. customize the widgets (create derived classes) or install event filter (from the main window to the TabWidget) and overwrite the mouse press, mouse release and mouse move events.

      There is no build in mechanism to achieve this.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        M_31
        wrote on last edited by
        #6

        Thank you for your valuable input..

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #7

          The widget used by QMainWindow is a QSizeGrip. Probably the best and easiest way to use it is to actually have your QTabWidget inside a QMainWindow with its status bar shown and setSizeGripEnabled(true) on the status bar.

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

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

            Would it not be enough to use QSplitter?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dangelog
              wrote on last edited by
              #9

              Wait a second, they're quite different controls :-)
              Now I'm not sure which one exactly we're talking about.

              Software Engineer
              KDAB (UK) Ltd., a KDAB Group company

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #10

                this would only move one part of it, but not make it resizable in all directions like in designer...

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

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

                  No, true, but then again, I don' t know the exact requirements of M_31 :-) Perhaps two QSplitters would also be enough. It all depends on what he needs to achieve (as opposed to the description of how he currently tries to achieve it.) It may be that he actually needs the kind of resize handles that you have in Designer, but I honestly doubt it. You don't see such a UI in many end-user applications. If M_31 only wanted to achieve resizing the tab widget, and only knew of the way Qt Designer presents that, then suggesting alternatives may be valuable. QSizeGrip may be what he needs, but then again: it may not be.

                  Anyway, lets hear from M_31 what he is up to really.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    M_31
                    wrote on last edited by
                    #12

                    Thanks to all for your advice.
                    Now i finally used QSplitter to achive my task..
                    I have used 2 splitter to work like tabwidget ( with 2 tabs)..& even now i can resize the same with the help of QSplitter control.

                    Instead of tab buttons, i have used Toolbar on the top of Splitter Window..
                    :)

                    Finally i achived my task...

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

                      Please be so kind to add [Solved] to the beginning of the thread title if you've got it working.

                      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

                      • Login

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