Demo entry 6684304

key

   

Submitted by anonymous on Dec 15, 2017 at 03:26
Language: C++. Code size: 327 Bytes.

void MainWindow::keyPressEvent ( QKeyEvent * e )
{
    int ivalue;
    switch(e->key())
    {
     case Qt::Key_9:
         QApplication::quit();
        break;
     case Qt::Key_5:
         Key2=1;
         Key3=0;
        break;
     case Qt::Key_3:
         Key2=0;
         Key3=1;
        break;

    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).