Jump to content

[SOLVED] Keyboard input ignored during debugging of GLAppQt (missing setFocusPolicy call in widget constructor)


photo

Recommended Posts

Posted

Hi,

 

been working on our version of GLAppQt and noticed that keyboard input went ignored when debugging (linux + kdbg). Checked that this behavior is also present in GLAppQt sample.

 

The cause is that the KeyPress/Release events are dispatched to the parent window which ignores it instead of to the GLAppQt widget.

 

Adding "setFocusPolicy (Qt::StrongFocus)" (or other desired policy) to (GL)AppQt constructor solves the issue.

 

 

On a sidenote, the grabKeyboard () call in the constructor results in an X error here:

 

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
 

Since I see no immediate need for it (app functions fine with input in- & outside debugger) I've disabled it. What is the intent for that call?

  • 1 month later...
Posted

Hi Esger,

 

Thank you for bug, I'll pass it to our dev team. Also, could you specify your linux version?

Posted

OpenSuSE 12.3

kernel 3.7.10-1.16-desktop

Qt-4.8.5

KDE4 desktop

Posted

You're awesome! Passed your bugs&fixes to dev team, hope they'll add that. :)

  • 3 weeks later...
×
×
  • Create New...