What do you want to break here? If you have to characters in a string that represents a hexadecimal number, use QString::toInt() and you're done.