diff --git a/t14/gamebrd.cpp b/t14/gamebrd.cpp index 743a91ac6cd0c7a47d33b9d71174e5ab0ef29af2..8ccc2716f34d0ceae24c7890c1dc9f8790cb25d7 100644 --- a/t14/gamebrd.cpp +++ b/t14/gamebrd.cpp @@ -65,9 +65,10 @@ GameBoard::GameBoard(QWidget *parent) QLabel *hitsL = new QLabel( "HITS", this ); QLabel *shotsLeftL = new QLabel( "SHOTS LEFT", this ); - QAccel *accel = new QAccel( this ); - accel->connectItem( accel->insertItem( Qt::Key_Space), this, SLOT(fire()) ); - accel->connectItem( accel->insertItem( Qt::Key_Q), qApp, SLOT(quit()) ); + QShortcut *fireShortcut = new QShortcut(Qt::Key_Space, this); + connect(fireShortcut, SIGNAL(activated()), this, SLOT(fire())); + QShortcut *quitShortcut = new QShortcut(Qt::Key_Q, this); + connect(quitShortcut, SIGNAL(activated()), qApp, SLOT(quit())); quit->setGeometry( 10, 10, 75, 30 ); angle->setGeometry( 10, quit->y() + quit->height() + 10, 75, 130 );