M
M
Mercury132017-10-06 18:18:26
User interface
Mercury13, 2017-10-06 18:18:26

How to calculate the area occupied by an icon or checkbox in QListView?

I'm trying to make a custom combobox. It has checkboxes, and when you click on the checkboxes, our combobox should not collapse. And for this, apparently, you will have to react in your own way if the user clicks on the checkbox with the mouse.
It should turn out something like this.
59d79ec002c84005326562.png
This is a real screenshot, so I don't think much code is required. At the moment, model.setData only fires when the spacebar is pressed, which is good. What about a mouse?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2017-10-06
@vt4a2h

You can try to override the show / hidePopup methods, play with view() or put an event filter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question