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. Does a easy-access "toggle" function exist for selecting items?
Forum Updated to NodeBB v4.3 + New Features

Does a easy-access "toggle" function exist for selecting items?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 197 Views 2 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

    I have a QTableWidget, and I have the code ui->tableWidget_Configs->selectRow(i); to select it. I am wondering whether an easy-access "toggle" function exists for selecting and unselecting items, or some workaround is needed to toggle or deselect items.

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Call ui->tableWidget_Configs->selectionModel() to get a selection model of the table. You can then call its select() method that lets you change selection using variety of modes, including toggle: SelectionFlags.

      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