robel
8th September 2015, 22:43
Hi,
i have problem with keypressed
to test my keypressed i put
void myapp::keyPressEvent(QKeyEvent* evt)
{
if (Qt::Key_Up)
{
cout<<"i winnnnn";
add_object();
emit keyPress(evt);}
}
but even if i press another key(z,y,left...) i see "i winn" in the screen and the "add_object() method executed too
i have problem with keypressed
to test my keypressed i put
void myapp::keyPressEvent(QKeyEvent* evt)
{
if (Qt::Key_Up)
{
cout<<"i winnnnn";
add_object();
emit keyPress(evt);}
}
but even if i press another key(z,y,left...) i see "i winn" in the screen and the "add_object() method executed too