I am working on a QTableView displaying a custom model subclasses from QAbstractTableModel in PyQt4. I need to be able to allow the user to set which column they want to serve as a specific type of data. To achieve this I want to implement a context menu when clicking on the header of a column, allowing options to set it as these types. I'm not sure how to create a context menu like this which can differentiate between different columns. Can anyone point me in the right direction?
Thanks