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. Toggle checkbox in QTableView with one click
Forum Updated to NodeBB v4.3 + New Features

Toggle checkbox in QTableView with one click

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

    I need to make one column in QTableView with a check-box/radiobutton.
    I can override print() and createEditor(...) methods but as for me it will be too rough (or wry).
    And if i want to (de-)select some of them i must first of all initiate editor and after that de-select checkbox.
    I want QCheckBox's behavior in QTableWidget but use QTableView / QAbstractTableModel.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Binary91
      wrote on last edited by
      #2

      Hi and welcome to DevNet!

      I think you have to work with delegates for your purpose.
      Maybe "this":http://qt-project.org/faq/answer/how_can_i_align_the_checkboxes_in_a_view is what you're looking for.

      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