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 itemSelectionChanged triggers
Qt 6.11 is out! See what's new in the release blog

QTableWidget itemSelectionChanged triggers

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

    Hi. According to the QTableWidget documentation itemSelectionChanged triggers "whenever the selection changes".

    What I am expecting is that whenever I click on an item in the QTableWidget, itemSelectionChanged will trigger. Instead, itemSelectionChanged is also triggering any time something is added/deleted from the QTableWidget. I am wondering whether there is something about itemSelectionChanged's triggering behaviors that I have missed.

    JonBJ 1 Reply Last reply
    0
    • Dummie1138D Dummie1138

      Hi. According to the QTableWidget documentation itemSelectionChanged triggers "whenever the selection changes".

      What I am expecting is that whenever I click on an item in the QTableWidget, itemSelectionChanged will trigger. Instead, itemSelectionChanged is also triggering any time something is added/deleted from the QTableWidget. I am wondering whether there is something about itemSelectionChanged's triggering behaviors that I have missed.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Dummie1138
      Well, adding/deleting items will also likely trigger a "selection changed". Check QList<QTableWidgetItem *> QTableWidget::selectedItems() const for what is now selected, maybe it's the same items as before, maybe all selections get cleared on changing items....

      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