def qbytearray_to_str(qba):
 return str(bytes(qba.toHex().data()).decode())

def qbytearray_to_str ( qba ) : return str ( bytes ( qba . toHex ( ) . data ( ) ) . decode ( ) )
convert qbytearray object to str in a way compatible with python 2/3 .