Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt - Password field, warn about Caps-Lock

Is there any Qt-built-in method to warn user (with pop-up window) that CapsLock is switched on while password field is active?

I am currently using QLineEdit (is it good?) with setEchoMode(QLineEdit::Password).

like image 656
Narek Avatar asked Jun 03 '10 17:06

Narek


1 Answers

once the user presses a key, you should check if the it's upper case AND if the shift is being held. if shift is not held,and the input is uppercase,caps lock is on. also if shift is down,and the input is lowercase,caps lock is on too.

like image 138
Biber Avatar answered Sep 20 '22 04:09

Biber