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. Can we use "\\?\" with QDir?

Can we use "\\?\" with QDir?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 508 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.
  • G Offline
    G Offline
    G_ka
    wrote on last edited by
    #1

    Hello,
    So, I'm trying to bypass the 260 characters path limit. I read here that we can prepend the path with \\?\ to achieve this, but it doesn't work.
    Actually, even temp.mkpath("\\\\?\\C:\\standard path"); doesn't work, while temp.mkpath("C:\\standard path"); does work.
    So, is there any way to bypass the path length limit without modifying the registry?
    Thanks.

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      Considering that I'm not developing on Windows, it seems that your question has been already been answered by your link.

      To be more explicit, the source code of Qt will already automatically prepend the path with "\?", look at the links in the discussion you linked:

      https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qfsfileengine_win.cpp#n86

      1 Reply Last reply
      0
      • G Offline
        G Offline
        G_ka
        wrote on last edited by
        #3

        @Gianluca said in Can we use "\\?\" with QDir?:

        Considering that I'm not developing on Windows, it seems that your question has been already been answered by your link.

        To be more explicit, the source code of Qt will already automatically prepend the path with "\?", look at the links in the discussion you linked:

        https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qfsfileengine_win.cpp#n86

        I see, thanks.
        Then, I don't understand why path lenght is still limited. If I try to create a long path, it won't work and I don't understand why.

        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