Qt World Summit: Register Today!

Global coordinates to QStyledItemDelegate coordinates

  • Hi guys.

    I have a subclass of QStyledItemDelegate and I need to know in which zone of the this delegate the user has clicked to execute differente actions.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What kind of action do you have in mind ?
    When should they happen ?

  • @SGaist Hi and thanks for answering.

    I have a QTreeView and a subclass of QStyledItemDelegate for each node.

    The delegate consists of a checkbox and several consecutive images to its right. The checkbox draws it with QStyle :: drawControl. What I want is to be able to control the click on the square of the checkbox because it should only change the checked / unchecked state when clicking on the square, not when it is clicked on the rest of the node.

    I hope I have explained.

Log in to reply