I have got a class MyLineEdit : QLineEdit
All I want is it to accept symbols if acceptSymbol() returns true and not accept it if it returns false. Has anybody got any idea why my implementation not working?
Qt Code:
{ if (key->key()==Qt::Key_Escape) emit escapePressed(); else { if ((key->key() >=48 ) || (key->key() <=57) || (key->key() >=65 ) || (key->key() <= 90) || (key->key() >=97) || (key->key() <=122)) { } else { if (acceptSymbols()) { } } } }To copy to clipboard, switch view to plain text mode
Bookmarks