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. Open external file (like test.txt) with its network share location?
Qt 6.11 is out! See what's new in the release blog

Open external file (like test.txt) with its network share location?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 590 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.
  • MucipM Offline
    MucipM Offline
    Mucip
    wrote on last edited by
    #1

    Hi,
    Normally I use to open externel files within Qt like ods file or txt file via below command:

     QDesktopServices::openUrl(QUrl("file:///" + fileLocation, QUrl::TolerantMode));
    

    This command works well if file location like "r:\deneme\file.txt"
    But when I use network location like "\WinShare\deneme\file.txt" then it's not working?!

    What is the difference and how can I solve this?!...
    Regards,
    Mucip:)

    raven-worxR 1 Reply Last reply
    0
    • MucipM Mucip

      Hi,
      Normally I use to open externel files within Qt like ods file or txt file via below command:

       QDesktopServices::openUrl(QUrl("file:///" + fileLocation, QUrl::TolerantMode));
      

      This command works well if file location like "r:\deneme\file.txt"
      But when I use network location like "\WinShare\deneme\file.txt" then it's not working?!

      What is the difference and how can I solve this?!...
      Regards,
      Mucip:)

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Mucip said in Open external file (like test.txt) with its network share location?:

      \WinShare\deneme\file.txt

      should be QUrl::fromLocalFile( "//WinShare/deneme/file.txt" )

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      MucipM 1 Reply Last reply
      4
      • raven-worxR raven-worx

        @Mucip said in Open external file (like test.txt) with its network share location?:

        \WinShare\deneme\file.txt

        should be QUrl::fromLocalFile( "//WinShare/deneme/file.txt" )

        MucipM Offline
        MucipM Offline
        Mucip
        wrote on last edited by
        #3

        Dear @raven-worx
        Work like a charm. Thanks.

        Regards,
        Mucip:)

        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