If i change the code like that
void bayrak
::keyPressEvent(QKeyEvent *keyEvent
) {
switch(keyEvent->key())
{
case Qt::Key_A:
timer.singleShot(150,this,SLOT(sol()));
break;
case Qt::Key_S:
timer.singleShot(150,this,SLOT(sag()));
break;
default:
}
void bayrak::keyPressEvent(QKeyEvent *keyEvent)
{
switch(keyEvent->key())
{
case Qt::Key_A:
timer.singleShot(150,this,SLOT(sol()));
break;
case Qt::Key_S:
timer.singleShot(150,this,SLOT(sag()));
break;
default:
QMainWindow::keyPressEvent(keyEvent);
}
To copy to clipboard, switch view to plain text mode
It works, if i change the keys as A and S it works.But key up and down doesnt work.
Bookmarks