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. Add widget into row into QTableView

Add widget into row into QTableView

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 318 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.
  • F Offline
    F Offline
    Fulgurance
    wrote on last edited by Fulgurance
    #1

    Hello, in my project,i need to make a QTableView with 2 or 3 widgets into the end of every rows (3 into only one column). Is it possible to do that?

    1 Reply Last reply
    0
    • MarKSM Offline
      MarKSM Offline
      MarKS
      wrote on last edited by
      #2

      check setIndexWidget() as documented here https://doc.qt.io/qt-5/qabstractitemview.html#setIndexWidget

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

        Hi
        Do note that setIndexWidget will become heavy if you have many rows.
        In that case, using a delegate provides far better performance.

        1 Reply Last reply
        3

        • Login

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