0

I have a sort of to-do list app and I would like to make it so that a user can click and drag down a list of checkboxes, toggling their state to be that of the first box clicked. Basically the same as this HTML question here: "Check" Multiple Checkboxes With Click & Drag?.

How would I go about doing this in Qt? I tried subclassing the mouseMoveEvent of a checkbox to get the current mouse state, but that did not work out for a number of reasons (not the least of which is that per the documenation mouseMoveEvents always return Qt.NoButton). I also ran into focus issues, whereby when the first box is clicked it grabs focus until the mouse is let go of, thus blocking signals to the other boxes.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Spencer
  • 1,931
  • 1
  • 21
  • 44
  • I am thinking that drag and drop events are the answer... – Spencer Jan 10 '20 at 03:33
  • What is the specific desired behavior? Say, if the first checkbox is checked, if I press it (not release yet), will the first checkbox change its check state? After that, when my mouse move (still not release yet), what will be the check states of the following checkboxes? – Minh Oct 12 '20 at 17:41

0 Answers0