I am making a application for maping some keyboard shortcuts to some event. So, I need detecting the keyboard shortcuts pressed after clicking a button. For Example, I have a button having text on it "change". When I click on it text on it changes to "press keys" then I need the user to type the shortcut keys he want to map then the text of the button changes to the keys pressed. While surfing the net, I was only able to find the function :
void MainWindow::keyPressEvent(QKeyEvent *event)
{
...
}
but it doesn t fulfill my purpose as I need calling this function from the slot function defined so that I can detect only when I need. Anybody having any idea how this can be achieved?