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. Itemview (selection)
Qt 6.11 is out! See what's new in the release blog

Itemview (selection)

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

    I have QTableView and what I DONT want is when you click on the column header Entire column gets selected similarly if you click on row header entire row gets selected. How can I prevent this.
    I want to do single and multi selection but only through mouse click on table view cells not by clicking on row/column header to select all the row or column.

    I tried using selectionMode and selectionBehavior but non of seems to work.
    Please help need any code snippet or any hint which can help me achieving my goal

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      If you don't want anything to happen when you click on the header you could use "setclickable":http://qt-project.org/doc/qt-4.8/qheaderview.html#setClickable

      Qt Certified Specialist
      www.edalsolutions.be

      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