def _resolveBaseclass(self, baseClass): try: for x in range(0, 10): try: return strict_getattr(QtGui, baseClass) except AttributeError: pass baseClass = self._widgets[baseClass][0] else: raise ValueError("baseclass resolve took too long, check custom widgets") except KeyError: raise ValueError("unknown baseclass %s" % baseClass)
def search(clsname): try: return strict_getattr(QtGui, clsname) except AttributeError: return None