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. checkbox checked or unchecked in dataChanged?
Forum Updated to NodeBB v4.3 + New Features

checkbox checked or unchecked in dataChanged?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 181 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.
  • S Offline
    S Offline
    SRaD
    wrote on 12 Nov 2020, 19:21 last edited by
    #1

    I have a checkbox in a TreeView and when I click on the checkbox, my model (which is derived from QAbstractItemModel) emits this function.

    dataChanged(const QModelIndex &tl, const QModelIndex &br, const QVector<int> &roles) { ... }
    

    Within this function, is there a way here to know if the checkbox that was clicked on is checked or unchecked?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 12 Nov 2020, 20:24 last edited by
      #2

      Hi,

      How did you implement that checkbox ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SRaD
        wrote on 12 Nov 2020, 20:43 last edited by SRaD 11 Dec 2020, 21:36
        #3

        Ok, nevermind, I think I've got it figured out. Thanks.

        1 Reply Last reply
        0

        1/3

        12 Nov 2020, 19:21

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved