I want to add a submenu in my context menu which is created like this:
self.widget_alignment.setContextMenuPolicy(Qt.ActionsContextMenu)
where widget_alignment is QTableWidget.
I created a new QMenu instance:
exchange_bases_menu = QMenu(self.widget_alignment)
added some actions, and I found a method QAction QMenu.addMenu (self, QMenu menu)
but I don't see any reference to the default context menu for self.widget_alignment. Additionally, this code:
self.widget_alignment.addMenu(exchange_bases_menu)
gave me: QTableWidget object has no attribute addMenu.
How can I add my submenu to the default context menu?