Input Events won't working in Qt


#1

Hi guys, i have a big problem. I make a simple Game Editor for my game in Urho3D, i need to process Input keys
but doesn’t working
i have embed Urho3D window using externalWindow, mouse events will working but Keyboard key not.
I’ve tried everything like Input->GetKeyDown() and by Events SubscribeToEvent()


#2

When you embed a window in Qt (or any UI lib for that matter), Qt takes care of all of the input events.
It kind of grabs the focus away from the original window.

I’m surprised that mouse is working, to be honest.

So what you will want to do is handle keyboard events within in Qt (which is pretty easy) and forward them to your game.


#3

I had the same problem. Check this:


#4

Thank’s for the help,I suspected that this was happening.


#5

I have tried to Call SDL_Push event, but don’t send event


#6

Do you mean that this solution doesn’t work? I haven’t tried it, but wanted to.


#7

Yep, this function doesnt working, only working if i use Engine event, like SendEvent(E_KEYDOWN)


#8

Then I must check it… I definetly need to make it work somehow.