You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

konopiux

Beginner

  • "konopiux" is male
  • "konopiux" started this thread

Posts: 12

Location: Lithuania

  • Send private message

1

Monday, December 12th 2011, 8:41am

Qt keylistener

Hi,
i'm new to QT,
can someone tell me, what is the best way to make
keylistener in Qt form?
I can use function kbhit ( ) or there is any another, maybe better way?
for example I need to use arrow keys.

This post has been edited 1 times, last edit by "konopiux" (Dec 12th 2011, 9:06am)


2

Monday, December 12th 2011, 10:59am

kbhit is not standard c++


look at eventFilter

http://doc.qt.nokia.com/latest/eventsand…l#event-filters
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Used tags

key, keylistener, move, qt