For a list widget, specifically in my case a QTreeWidget, what's the best way to cause a context menu's actions to take as inputs for their action information from the row that is clicked?

I think this is a relatively common situation, generally when you have a context menu, it's to cause some type of a context sensitive response.

The best I've come up with is as follows:
-Use a custom context menu.
-Connect the custom context menu to a function that creates the action I want, which let's say is delete row. Use the itemAt function to find the item that was clicked, and connect a slot on the row to the triggered() event of the action. Unfortunately, this requires me to subclass QTreeWidgetItem and make sure that all my rows are populated with my subclass just so it can hold my delete row slot.
-Add the action I want to the context menu.
-In the subclass of QTreeWidgetItem I make, create an appropriate delete function that reads information out of the columns in order to find the information it needs to pass to the underlying data model to inform the model of which item needs to be deleted.

Am I doing things the stupid way (I hope!), or is there a clearly better way out there I'm missing? I feel like it can't be right, and seems awfully heavy, that I'm subclassing QTreeWidgetItem just to catch a context menu action.