Qt- esc key release issue
-
I have an application in which i have a class T derived from X, and X is derived from QWidget class. In class X i have an overwritten key release event handler which treats the esc key code when released by closing the window and performing some actions. If T doesn't overwrite that and enharits the behaviour from X, when i press esc and T is busy handling the key release and performing certain actions, if I press esc again by what handler will it be handled (i get a weird seg fault, and i'm sure it's from my code, but i can't trace where the second esc key release is handled, and I don't have a lot of experience with this framework) thanks in advance :)
-
Please just show us your key handing reimplementations... We can't help you trace down what happens without seeing your (relevant) code.
-
[quote author="Andre" date="1341920033"]Please just show us your key handing reimplementations... We can't help you trace down what happens without seeing your (relevant) code. [/quote]
ok, i will come with the code soon, thanks for the answer
-
[quote author="Slyvr" date="1341929415"]
[quote author="Andre" date="1341920033"]Please just show us your key handing reimplementations... We can't help you trace down what happens without seeing your (relevant) code. [/quote]ok, i will come with the code soon, thanks for the answer [/quote]
Yeah, it will be great.
-
well the classes are something like
@
class T:public X{
...class X: public QWidget {
....
@
and the handler in X is
@
void X::keyReleaseEvent(QKeyEvent* e){if(e->key()==X->getEscKeyCode)
FunctionDoingSomething();}
@
and T just enharits it from X, no modification.So when it is T, in FunctionDoingSomething(), to be more exact, how will the keyrelease of Esc be treated, because i want to trace it's effect, it goes into segmentation fault
Edit: use @ tags around code sections please, Andre
-
bq. @#
if(e->key()==X->getEscKeyCode)FunctionDoingSomething();
@
Where does the X-> come from? You probably ment to use X::getEscKeyCode()? Please send a copy of your original source code, as this "pseudo code" does not help to help you.