[Qt-interest] how to determine if Qt::Key is printable and get the according string?
Girish Ramakrishnan
girish at forwardbias.in
Mon Dec 20 09:39:53 CET 2010
On Sun, Dec 19, 2010 at 7:29 PM, noname <freekee1 at gmx.de> wrote:
> hi everyone!
>
> i can't seem to figure out how i can
> 1. determine if a given Qt::Key value is a printable one, or just some
> functional key
> 2. get the according text (QChar/QString) in case it is printable.
>
> Maybe someone here has a solution or a hint?
>
Assuming you have a QKeyEvent, you have use QKeyEvent::text(). To
check if it's printable, you can use QChar::isPrint().
Girish
More information about the Qt-interest-old
mailing list