Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How do I add another tab to QtTabWidget using QtDesigner ?
QtWS25 Last Chance

How do I add another tab to QtTabWidget using QtDesigner ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 12.4k 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    I am trying to get a hang of using QtDesigner.
    It looks as I can copy some parts and not some other.

    I have QTabWidget with two original tabs and I like to "copy and paste" more tabs into it.

    My latest attempt created another QTabWidget within the first tab , not what I intended to do.

    If I select / highlight tab itself - QWidget - I have no option to "copy " it.

    Suggestions on how to do this would be appreciated.

    PS
    Do the panes in QtDesigner GUI have names ?

    fe974721-b2df-423d-bbd3-2106832e720a-image.png

    Pl45m4P 1 Reply Last reply
    0
    • A Anonymous_Banned275

      I am trying to get a hang of using QtDesigner.
      It looks as I can copy some parts and not some other.

      I have QTabWidget with two original tabs and I like to "copy and paste" more tabs into it.

      My latest attempt created another QTabWidget within the first tab , not what I intended to do.

      If I select / highlight tab itself - QWidget - I have no option to "copy " it.

      Suggestions on how to do this would be appreciated.

      PS
      Do the panes in QtDesigner GUI have names ?

      fe974721-b2df-423d-bbd3-2106832e720a-image.png

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @AnneRanch said in How do I add another tab to QtTabWidget using QtDesigner ?:

      more tabs

      Right-click on one of your tabs or the tabWidget in your list on the right and select "add page" or "insert page" (I dont know the exact term since my QtC is not in English language). It's the 11th option from top.

      BTW:
      Your centralWidget doesn't have a layout (red crossed circle sign next to the name).

      Edit:

      It seems that you've copied your whole tabWidget (because you have cascading tabs)


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      2
      • A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        Thanks, works perfect.
        Even when my Qt is in English "Page" and "Tab" are not the same in MY dictionary. I do not mind misleading terminology / labels if I do have a backup copy or I do see easy way to delete the results.
        But generally I am hesitant to use it.
        I am sure I'll have some fun deleting the extras I have accidentally" created .

        Pl45m4P 1 Reply Last reply
        0
        • A Anonymous_Banned275

          Thanks, works perfect.
          Even when my Qt is in English "Page" and "Tab" are not the same in MY dictionary. I do not mind misleading terminology / labels if I do have a backup copy or I do see easy way to delete the results.
          But generally I am hesitant to use it.
          I am sure I'll have some fun deleting the extras I have accidentally" created .

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @AnneRanch

          QStackedWidget is another example...
          I guess its content is called "page" too, but in this case it makes a bit more sense, since it works like a book of widgets, where you can flip the "pages" to change your visible widgets in place.

          Some things need some time to get familiar with.

          Edit:
          Page is only the content of QTabWidget. You create a new "page", which is connected to the tabWigets' tabBar, showing which "page" is currently active and to provide the functionality of changing pages by clicking the "tabs". If this makes sense :)
          (If they had called it "Tab", somebody would say "Why "tab" and not "page"?)

          Edit^2:

          The C++ functions to add tabs are indeed called addTab() and insertTab()
          https://doc.qt.io/qt-5/qtabwidget.html#addTab


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          A 1 Reply Last reply
          1
          • Pl45m4P Pl45m4

            @AnneRanch

            QStackedWidget is another example...
            I guess its content is called "page" too, but in this case it makes a bit more sense, since it works like a book of widgets, where you can flip the "pages" to change your visible widgets in place.

            Some things need some time to get familiar with.

            Edit:
            Page is only the content of QTabWidget. You create a new "page", which is connected to the tabWigets' tabBar, showing which "page" is currently active and to provide the functionality of changing pages by clicking the "tabs". If this makes sense :)
            (If they had called it "Tab", somebody would say "Why "tab" and not "page"?)

            Edit^2:

            The C++ functions to add tabs are indeed called addTab() and insertTab()
            https://doc.qt.io/qt-5/qtabwidget.html#addTab

            A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by Anonymous_Banned275
            #5

            @Pl45m4Your are correct on both counts - it takes some practice.
            I unfortunately recall, , I would rather forget that experience , "tab" in MFC . Never did mastered the "tab bar" and "pages" relations...
            I am slowly practising "switching" between GUI and "text".
            So far my program still compiles and runs...or just limps along...
            Still collecting "#includes " as I go .

            As I was afraid , adding all this "ui_..." stuff is a challenge to a greenhorn.

            Many thanks for all you help, appreciate it.

            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