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. [Solved] Display QTableView in QTabWidget or QWidget
Forum Updated to NodeBB v4.3 + New Features

[Solved] Display QTableView in QTabWidget or QWidget

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 5.4k 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
    amban
    wrote on last edited by
    #1

    Hi,
    Kindly help me out with this issue. I have a QTableView object which i display currently using
    @qtableview_object.show();@

    How will i display this tableview object inside a tab say x within QTabWidget y?

    Please help.

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

      Add it to that tab. See QTabWidget docs.

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amban
        wrote on last edited by
        #3

        I understand i have to add it to the tab, i am not understanding how to do that.

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

          Ok, so... I guess docs are not that good. Exactly which parts of QTabWidget docs are unclear in your opinion, so we can explain them to you?

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

          1 Reply Last reply
          0
          • A Offline
            A Offline
            amban
            wrote on last edited by
            #5

            Hi Peppe,
            I have created several standalone programs now i have to merge them into one Tab Widget. One of the program was to create a QTableView and i display it using @qtableview_objectname.show()@

            Now how do i display this qtableview object in one of the tabs ? I understand i have to probably just add one line which would be something like ui->tab_name-> ???? i am unable to figure this out. How to add the tableview object say x to tab y

            Thanks for helping

            1 Reply Last reply
            0
            • L Offline
              L Offline
              loladiro
              wrote on last edited by
              #6

              From the "documentation":http://doc.qt.nokia.com/4.7/qtabwidget.html:
              [quote]
              The normal way to use QTabWidget is to do the following:

              1. Create a QTabWidget.
              2. Create a QWidget for each of the pages in the tab dialog, but do not specify parent widgets for them.
              3. Insert child widgets into the page widget, using layouts to position them as normal.
              4. Call addTab() or insertTab() to put the page widgets into the tab widget, giving each tab a suitable label with an optional keyboard shortcut.

              [/quote]

              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