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. Disable selection completely.
Forum Updated to NodeBB v4.3 + New Features

QTableWidget. Disable selection completely.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 5.7k 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.
  • Z Offline
    Z Offline
    za83
    wrote on last edited by
    #1

    I set selectionMode to NoSelection. Selection turned off. But dotted line is still painting. How can I hide it?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      monalisakanungo
      wrote on last edited by
      #2

      Hi,
      Try with this.

      QTableWidget * tab = new QTableWidget();
      tab->setShowGrid(false);

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        za83
        wrote on last edited by
        #3

        I talk not about this.
        Selection is disabled. But when I click on a cell there is appear dotted line on the borders of the cell.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          This is not a selection, but the current item. That's not the same thing.

          One way would be to use a QProxyStyle to manipulate the flags that get send to the underlying QStyle to render the table. I think that by playing around with the flags in the QStyleItem you can remove the focus rectangle.

          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