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. QTableWidgetItem objects deletion
Qt 6.11 is out! See what's new in the release blog

QTableWidgetItem objects deletion

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

    Does setRowCount(0) perform a delete on the QTableWidgetItem objects that have been added, or is clearContents() needed too?
    Thanks.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      HuXiKa
      wrote on last edited by
      #2

      If you check the "source of QTableWidgetItem":http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/itemviews/qtablewidget.cpp you can find it out easily (setRowCount calls removeRows, which deletes the item).

      If you can find faults of spelling in the text above, you can keep them.

      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