Thanks for the information, Justin. After re-arranging the `self.separator` I managed to get the newly created items to be slotted into the specified position of mine.
While this seems to be working, as I tried to implement in the same makings into my actual tool, I keep getting `RuntimeError: Internal C++ object (PySide2.QtWidgets.QAction) already deleted.`, seemingly the `self.separator` got killed off in the midst of it. The code structure in my actual tool is almost the same as the one that I have posted in this thread, with the exception that I have 'watered' down the code in this thread in hopes of keeping it short and simple. Even so, wondering if you may any advice to this? Read online for this issue is to make it into a variable in which I did, but still it did not work. However, if I do the following: def mousePressEvent(self): self.separator = self.qmenu.addSeparator() ... items can still be created and added into the menu, but this time round, each will be created with both the item and the separator altogether -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c2eedb45-b913-4430-a6f8-e39a5a2d3a78%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.