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

qTableWidget RemoveRow Error

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

    Hello,

    I hope this is the right place to post this, but I am using pyqt4 and am having issues using a table widget. My error is that when I remove a row, the table then take the next row above and it places it into the location the previous row was in visually, but when I try to access it in the code, all the widgets and items on the row that get moved up still show that they have the old index. Ex. if I delete row 3 from the table, instead of row 4 becoming row 3 now, all the items in the table still indicate that they belong to row 4.

    Furthermore, when I try to add another row, it would then become row 4, thus giving me two row 4 essentially. Any ideas on what to do??

    Thanks!

    VRoninV 1 Reply Last reply
    0
    • S sv17

      Hello,

      I hope this is the right place to post this, but I am using pyqt4 and am having issues using a table widget. My error is that when I remove a row, the table then take the next row above and it places it into the location the previous row was in visually, but when I try to access it in the code, all the widgets and items on the row that get moved up still show that they have the old index. Ex. if I delete row 3 from the table, instead of row 4 becoming row 3 now, all the items in the table still indicate that they belong to row 4.

      Furthermore, when I try to add another row, it would then become row 4, thus giving me two row 4 essentially. Any ideas on what to do??

      Thanks!

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      @sv17 said in qTableWidget RemoveRow Error:

      all the items in the table still indicate that they belong to row 4.

      How? can you show the code?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2

      • Login

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