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. Nested QtableView
Forum Updated to NodeBB v4.3 + New Features

Nested QtableView

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 390 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.
  • K Offline
    K Offline
    KlodKrichen
    wrote on last edited by
    #1

    I have a QTableView that presents a table looking like this:
    b37f8ac9-26e3-47f2-8c8f-714c4bfab6bc-111.png

    Everything is working great, but now I need to change the table to have nested cells. It needs to eventually look like this:
    46d1ff3a-34bd-40b4-9520-03b0f799a9d1-222.png

    I thought about using a custom delegate inheriting from QStyledItemDelegate for the GW columns, and that delegate will be another QTableView or QTableWidget. It seems like a lot of work. Is there any easier approach to follow or is there any similar examples to have an idea ?

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

      Hi,

      Isn't that rather a tree view ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        KlodKrichen
        wrote on last edited by
        #3

        The table will be empty and the user will fill in the different cells. First he will choose the associated function in the first column then he will apply each GW to the function chosen to have a deviation. Finally, the user will choose the number of TE for each deviation and will fill in each cell. It is well presented by a treeview, but a tableview is more convenient to get the user input.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          From your description, I would say that a dedicated widget would yield better results rather than trying to squeeze everything inside a table.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

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