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. QTabWidget is empty in GUI, but it contains tabs

QTabWidget is empty in GUI, but it contains tabs

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 557 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.
  • P Offline
    P Offline
    pvt.peter
    wrote on last edited by
    #1

    I encountered a problem in Qt5.
    So i have got a *.ui file, with the following structure:

    QWidget
       QTabWidget
          QWidget (tab)
             QPushButton
          QWidget (tab)
             QVBoxLayout
                QTableView
          QWidget (tab)
    

    I have got an other *.ui file which contains an empty QTabWidget.
    I would like to set this empty QTabWidget properly.
    I got the pointer of QTabWidget from the above structure, and set it to the empty QTabWidget.
    It was successfully seemingly, but not show any tab. I invoked count() and widget(int) method of QTabWidget and it contained the right tabs.

    Why can not I see the content QTabWidget on the GUI?

    What is the problem?

    How can i add all children of QTabWidget from the above structure to he empty QTabWidget?

    Thanks in advance.

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

      Hi
      I think you need to show the code as this

      • I got the pointer of QTabWidget from the above structure, and set it to the empty QTabWidget.

      Sounds completely wrong :)

      Also you are not allowed to clone/copy QWidgets
      so Im not sure what you are trying.

      If you want the same tabs in both tables,
      You should just add to both.
      If you are trying anything like copy/clone it wont work.

      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