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 selection with no hist
Forum Updated to NodeBB v4.3 + New Features

QtableWidget selection with no hist

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

    when one cell of qtablewidget is selected, it is highlighted, that is correct. But when I click on the empty area of the qtablewidget, the highlighted color is gone. And guess what, the previous cell still remains selected. Is there a solution to make the highlighting to persist even if i click on the empty area of table?

    Click on a row:
    !http://i58.tinypic.com/1z3nnsi.png(mouse on)!
    Click on the empty area:
    !http://i62.tinypic.com/n2d3zc.png(mouse on)!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      The previous cell does not remain selected. It might remain the current cell but that's a different thing.

      Try:
      @
      tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
      tableView->setSelectionMode(QAbstractItemView::MultiSelection);
      @

      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