docstr: Pyside provides a dict for easy evaluation
docstr_tok: ["Pyside","provides","a","dict","for","easy","evaluation"]
code: def _getAllowedEnums(self, enum):
      """Pyside provides a dict for easy evaluation"""
      if issubclass(enum, Enum):
          # PyQt6 and PySide6 (opt-in in 6.3.1) use python enums
          vals = {e.name: e for e in enum}
      elif "PySide" in QT_LIB:
          vals = enum.values
      elif "PyQt5" in QT_LIB:
          vals = {}
          for key in dir(self.searchObj):
              value = getattr(self.searchObj, key)
              if isinstance(value, enum):
                  vals[key] = value
      else:
          raise RuntimeError(
              f"Cannot find associated enum values for qt lib {QT_LIB}"
          )
      # Remove "M<enum>" since it's not a real option
      vals.pop(f"M{enum.__name__}", None)
      return vals
  
file_path: pyqtgraph/pyqtgraph/parametertree/parameterTypes/qtenum.py
imports: from enum import Enum
  from ...Qt import QT_LIB, QtCore
  from .list import ListParameter
label_desc: Use image node_id 5 for calling the QtEnumParameter obj's underlying member method code with example usage: obj._getAllowedEnums(enum) and returns: vals