Hi all, in my tool, I am trying to store the list of QMenus and QActions as a dictionary, so that I will be using it at a later point.
Instead of storing them by their names, I am actually storing them by their memory names (not sure if there is a term for this) and from time to time, the items (values) in the dictionary are wrong.
This is an example of my captured data:
{0: {<qt5.QtGui.QMenu object at 0x7ff6e5f238c0>: [<PySide2.QtWidgets.QAction object at 0x7ff6e5f25b48>,
<PySide2.QtWidgets.QAction object at 0x7ff6e60e27a0>,
<PySide2.QtWidgets.QAction object at 0x7ff6e60e2290>],
<qt5.QtGui.QMenu object at 0x7ff6e60e21b8>: [<PySide2.QtWidgets.QAction object at 0x7ff6e5f25b48>,
<PySide2.QtWidgets.QAction object at 0x7ff6e60e27a0>,
<PySide2.QtWidgets.QAction object at 0x7ff6e60e2290>]}}
As you can see, I have 2 different keys but for some reasons, its items within are the same in which it should not be. (In my test case, 1 contains 2 items, the other contains 3 items.)
Even so, my main question here is - is it wise to store items by memory (do let me know if there is an actual term for it)?
(Pardon me for my coding terms as I doing self-learning)