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. Why QDir::entryList doesn't return links?

Why QDir::entryList doesn't return links?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 338 Views 2 Watching
  • 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.
  • A Offline
    A Offline
    AlexNevskiy
    wrote on last edited by
    #1

    I'm using Qt 5.15.2. Trying to get all the files and dirs in the directory, but I can't get no one link.

    The code:

    #include <QDebug>
    #include <QDir>
    
    int main(int argc, char *argv[])
    {
        qDebug() << QDir("D:/test").entryList();
        return 0;
    }
    
    

    It doesn't return files with extension *.lnk which are in the dir. I'm working on Windows. What is the right way to get them?

    M 1 Reply Last reply
    0
    • A AlexNevskiy

      I'm using Qt 5.15.2. Trying to get all the files and dirs in the directory, but I can't get no one link.

      The code:

      #include <QDebug>
      #include <QDir>
      
      int main(int argc, char *argv[])
      {
          qDebug() << QDir("D:/test").entryList();
          return 0;
      }
      
      

      It doesn't return files with extension *.lnk which are in the dir. I'm working on Windows. What is the right way to get them?

      M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      @AlexNevskiy
      try with filter QDir::System

      QDir::System 0x200
      List system files (on Unix, FIFOs, sockets and device files are included; on Windows, .lnk files are included)

      A 1 Reply Last reply
      3
      • M mpergand

        @AlexNevskiy
        try with filter QDir::System

        QDir::System 0x200
        List system files (on Unix, FIFOs, sockets and device files are included; on Windows, .lnk files are included)

        A Offline
        A Offline
        AlexNevskiy
        wrote on last edited by
        #3

        @mpergand Thank you. It works!

        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