fix attributes to work on PyQt and PySide