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. How to draw a rectangle to select multiple cells of QTableView?
Forum Updated to NodeBB v4.3 + New Features

How to draw a rectangle to select multiple cells of QTableView?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 396 Views
  • 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.
  • S Offline
    S Offline
    StudyQt1
    wrote on last edited by StudyQt1
    #1

    Sth like in EXCEL, user drags to draw a rectangle to select multiple cells
    Capture.JPG
    I am thinking maybe I can set a transparent blank qwidget on top of the qtableview to use QRubberband, but is there a built-in functionality in QTableView? Looks like once I click on QTableview only single cells get selected.... Thank you very much

    JonBJ 1 Reply Last reply
    0
    • S StudyQt1

      Sth like in EXCEL, user drags to draw a rectangle to select multiple cells
      Capture.JPG
      I am thinking maybe I can set a transparent blank qwidget on top of the qtableview to use QRubberband, but is there a built-in functionality in QTableView? Looks like once I click on QTableview only single cells get selected.... Thank you very much

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

      @StudyQt1
      What is your QAbstractItemView::SelectionMode ? Does QAbstractItemView::MultiSelection

      Multiple items can be toggled by dragging the mouse over them.

      not do what you are looking for?

      S 1 Reply Last reply
      1
      • JonBJ JonB

        @StudyQt1
        What is your QAbstractItemView::SelectionMode ? Does QAbstractItemView::MultiSelection

        Multiple items can be toggled by dragging the mouse over them.

        not do what you are looking for?

        S Offline
        S Offline
        StudyQt1
        wrote on last edited by
        #3

        @JonB I am really sorry about this question.... I want to keep this simple question for Qt beginners

        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