eine Frage ich habe folgendes keyPressEvent
Code: Alles auswählen
void Mmi::keyPressEvent(QKeyEvent *p_event)
{
switch ( p_event->key() ) {
case Qt::Key_F1:
p_gui->test();
break;
case Qt::Key_F2:
QMessageBox::information(this, "KeyPressed", "F2 was pressed");
break;
case Qt::Key_F3:
QMessageBox::information(this, "KeyPressed", "F3 was pressed");
break;
case Qt::Key_F4:
QMessageBox::information(this, "KeyPressed", "F4 was pressed");
break;
case Qt::Key_F5:
QMessageBox::information(this, "KeyPressed", "F5 was pressed");
break;
case Qt::Key_F6:
QMessageBox::information(this, "KeyPressed", "F6 was pressed");
break;
}
Code: Alles auswählen
void GuiClient::test()
{
QMessageBox::information(manMachineInterface, "Test", "is ok");
std::cout << "test pressed" << std::endl;
}
Hat hier vl irgendjemand einen Tip für mich wie ich das zum Laufen bringe.
Alle anderen keyEvents funktionieren...
Bin für alles dankbar.
lg mlick