[SOLVED] Get access to executable file in Linux



  • Hello,

    i have little question.
    In Windows I can get access to executable file in the following manner:
    for example, i have exe-file called PRG.exe
    @fileName = QFileDialog::getOpenFileName(this, tr("Open"), _settings->exeFileDefaultPath(), tr("PRG (*.exe)"));
    @

    and my question: how can I get access to executable file in Linux?
    This code don't works:
    @fileName = QFileDialog::getOpenFileName(this, tr("Open"), _settings->exeFileDefaultPath(), tr("PRG (PRG)"));@

    Best regards, Vladimir.



  • Hi,

    I'm not very familiar with this method. But I know a little unix terminals. So I would type:
    @
    fileName = QFileDialog::getOpenFileName(this, tr("Open"), _settings->exeFileDefaultPath(), tr("./PRG (PRG)"));@


  • Lifetime Qt Champion

    Hi,

    @
    fileName = QFileDialog::getOpenFileName(this, tr("Open"), _settings->exeFileDefaultPath(), "PRG");
    @

    Don't put any extension/additional text, this way you should only be able to select file named PRG



  • Thanks for all responses!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.