You can use underscores if you subclass this. And you can name your methods with underscores and PyQt4 will be able to use them as if you have named them with camelCase.
class SomeClass(object):
def __getattr__(self, attr):
if '_' in attr:
new = [c for c in attr]
while True:
try:
new_char = new[new.index('_') + 1].upper()
new[new.index('_'):new.index('_') + 2] = new_char
except (IndexError, ValueError):
break
else:
for c in attr:
if c.isupper():
new = []
for i, c in enumerate(attr):
if i != 0 and c.isupper():
new.append('_')
new.append(c.lower())
break
try:
return super(type(self), self).__getattribute__(''.join(new))
except Exception:
return super(type(self), self).__getattribute__(attr)