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. Filedialog set folder problem
QtWS25 Last Chance

Filedialog set folder problem

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.6k 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.
  • S Offline
    S Offline
    skammers
    wrote on last edited by
    #1

    Hey!

    I have a FileDialog which I want to preset the folder path for. It works perfectly as long as the path is from a local disc like this:

    • C:\Deployment\Master\Work

    But if the path comes from a server disk like this:

    • \eunxosk-sfi0xx\users$\myUser\System\Desktop\myProject\Master/Work

    I get this error:
    @shellItem: SHCreateItemFromParsingName(/eunxosk-sfi0xx/users$/myUser/System/Desktop/myProject/Master/Work)) failed (An attempt was made to reference a token that does not exist.)--@

    Any help?

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NetZwerg
      wrote on last edited by
      #2

      Did you double quote all backslashes?

      @QString("\\eunxosk-sfi0xx\users$\myUser\System\Desktop\myProject\Master\Work")@

      1 Reply Last reply
      0
      • S Offline
        S Offline
        skammers
        wrote on last edited by
        #3

        Do I need to do so? :)

        I mean, why would that be necessary?

        1 Reply Last reply
        0
        • N Offline
          N Offline
          NetZwerg
          wrote on last edited by
          #4

          In C/C++ the backslash ("") character is the escape character. So for using the backslash as character you will have use the double backslash, so escaping the escape character, which makes it read as real letter-character.

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

            Hi,

            To simplify things, with Qt you can use the unix notation for all platforms so forward slashes, thus making it easier to avoid this kind of problem. Can you also test with a path that doesn't contain a $ ?

            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
            • S Offline
              S Offline
              skammers
              wrote on last edited by
              #6

              I actually used the forward slashes. The ones I showed you are after i converted them into backslashes (only for views sake). Seems to work without the $! Do you think that is what are causing the problem?

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

                It might be indeed, AFAIK $ is an unusual char in a path however it doesn't mean it should not work when using Qt. I think you should try asking on the interest mailing list to see if it's indeed the case. You'll find there Qt's developers/maintainers (this forum is more user oriented)

                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

                • Login

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