It seems logical that you would want to do something with the file path returned by the dialog therefore it seems obvious you can't do it as a direct slot invokation. Instead connect the action's triggered() signal to a custom slot where you will call QFileDialog::getOpenFileName() and process the value it returns. And there are really multiple examples in the docs bundled with your Qt installation that show how to do that.