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. QTableWidget Delete Functionality
Forum Updated to NodeBB v4.3 + New Features

QTableWidget Delete Functionality

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.8k 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.
  • B Offline
    B Offline
    BettaUseYoNikes
    wrote on last edited by
    #1

    I am making a custom context menu for a QTTableWidget that allows the user to select random cells and then delete the contents of every cell selected. Haven't been able to find any built in functions that return the row and col value for each cell that is selected. I was thinking what I may have to do is store all the values by using the cellClicked() signal and then when the user right clicks to delete then iterate through my lists and delete each cells contents. Haven't been able to find a similar post so im wondering whether anyone has tried this before and can point me in the right direction.

    Thank you

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RauBurger
      wrote on last edited by
      #2

      From what I'm seeing, that might be the way you have to do it. It doesn't look like using a QTableView with a QStandardModel would help either. How would you go about implementing your idea. You could subclass QTableWidget and handle the logic internally that way. The parent widget class would then be free and clear of child widget logic clutter.

      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