Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Toggle checkbox in QTableView with one click

    General and Desktop
    2
    2
    1516
    Loading More Posts
    • 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
      Filippov last edited by

      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 Reply Quote 0
      • B
        Binary91 last edited by

        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 Reply Quote 0
        • First post
          Last post