Qt keypressevent detects key press as hexa not ascii
-
Hi everyone,
here i wrote a small application on serialport using Qserialport class where i done all the appliocation but struct with one final step. our customer wants to send a hexadecimal data not asciicharachters but keypress event will detect keyboard keys as only ascii charachters.
So i want to know is there any procedure so that on GUI if i choose hex data then after if i press keys from keyboard ot should sense keys as hexa data also non hexa charachter(say like g to z) should be given a as non hexa charachter you entered.
Is there any way to achive this.
Thnaks & Regards
A.N.V.Lavanya -
@Lavanya said in Qt keypressevent detects key press as hexa not ascii:
So i want to know is there any procedure so that on GUI if i choose hex data then after if i press keys from keyboard ot should sense keys as hexa data also non hexa charachter(say like g to z) should be given a as non hexa charachter you entered.
You should rephrase this as it is hard to understand what you mean.
If you want to send numbers as hex strings (a key is nothing else as a number) then use https://doc.qt.io/qt-5/qstring.html#number