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 remove the two default tabs in QTabWidget created by Qt Creator?
Forum Updated to NodeBB v4.3 + New Features

How do I remove the two default tabs in QTabWidget created by Qt Creator?

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 5 Posters 6.4k Views 2 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.
  • L Offline
    L Offline
    lansing
    wrote on last edited by
    #1

    In my creator I create a QTabwidget in the ui, it came with two default tabs. Now I want to add my own tab in the source, how do I remove those default one? The creator is not letting me to delete them.

    JonBJ 1 Reply Last reply
    0
    • L lansing

      In my creator I create a QTabwidget in the ui, it came with two default tabs. Now I want to add my own tab in the source, how do I remove those default one? The creator is not letting me to delete them.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @lansing
      If you can't get rid of them in Creator --- I can't remember if you can --- there is always runtime https://doc.qt.io/qt-5/qtabwidget.html#removeTab to remove tabs.

      1 Reply Last reply
      1
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        QTabWidget::clear(). In the creator right click the tab name and you can delete them.

        L 1 Reply Last reply
        2
        • JoeCFDJ JoeCFD

          QTabWidget::clear(). In the creator right click the tab name and you can delete them.

          L Offline
          L Offline
          lansing
          wrote on last edited by
          #4

          @JoeCFD

          I can't, they have the stop sign on their name, there's no delete option when right click.

          B JonBJ 2 Replies Last reply
          0
          • L lansing

            @JoeCFD

            I can't, they have the stop sign on their name, there's no delete option when right click.

            B Offline
            B Offline
            Bonnie
            wrote on last edited by Bonnie
            #5

            @lansing
            Hmm...I don't know what a stop sign means...
            But the normal way is, right click the QTabWidget (not the page) -> Page x of y -> Delete

            1 Reply Last reply
            1
            • L lansing

              @JoeCFD

              I can't, they have the stop sign on their name, there's no delete option when right click.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @lansing , @Bonnie
              The "no=entry" sign is missing a layout on a widget. This will be the case on a blank tab page inserted in Designer. It should not be connected to whether you can delete or not.

              1 Reply Last reply
              1
              • mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi
                As @Bonnie says

                alt text

                L 1 Reply Last reply
                2
                • mrjjM mrjj

                  Hi
                  As @Bonnie says

                  alt text

                  L Offline
                  L Offline
                  lansing
                  wrote on last edited by
                  #8

                  @mrjj

                  Oh I see the options now, I was right clicking on the tab objects in the tree view on the right panel. There's no delete option there.

                  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