Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Get access to executable file in Linux

[SOLVED] Get access to executable file in Linux

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vovasty
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Snowseeker
      wrote on last edited by
      #2

      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)"));@

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Vovasty
          wrote on last edited by
          #4

          Thanks for all responses!

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved