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. QFileSystem or QDir to access Windows Phone which is plugged in via USB

QFileSystem or QDir to access Windows Phone which is plugged in via USB

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 868 Views 1 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.
  • E Offline
    E Offline
    eul3r
    wrote on last edited by
    #1

    Hello,

    I'm trying to get my pictures from Windows Phone automatically copied to my PC using a Qt Application running on my PC.

    I tried QFileSystem and QDir, however i can't acces it with QFileSystemModel nor QDir.
    In Windows Windows Phone is listed under "Devices and Drives" like my hdd.

    I can access files on Windows Phone via Windows Explorer.

    Any idea??

    // yes i googled....

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      When you access it from explorer does it have a drive letter assigned?

      If so then something like this should work:

      @
      QDir phoneDir("f:/"); // assuming F: as phone drive letter
      if (phoneDir.exists())
      {
      // do your stuff here
      }
      @

      Also you can use the following to get a list of drives which should then contain the drive letter of your phone:

      @
      QFileInfoList fiList = QDir::drives();
      @

      Finally if your phone does not have a drive letter then it isn't truly in the file system. It means that the driver it uses in windows is letting the OS access it directly but not giving it an easy "hard drive like" way for you to access it programatically. I can't help you with this one as I don't have a Windows phone or use windows. :)

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      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