PDA

View Full Version : [SOLVED]-->How to get int using Hex format in QLineEdit !



Krish
20th March 2008, 12:36
Hello! Friends,
I was using QLineEdit->toInt() to get the required input as int. But now as i have changed the inputmask of QLineEdit to say Hex, am not able to get proper input. As we cant use toInt() now i tried few things with QByteArray, but not working.

Can anyone please help me to get proper int input from QLineEdit where Hex format is displayed.----> i will grateful:)

Thanks in advance.

Krish
20th March 2008, 12:42
Thanks to everybody, but i managed to solve it!:)

Best regards.

wysota
20th March 2008, 14:37
I don't know if you are aware QString::toInt() can read hex values as well if you pass 16 as the second parameter.