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. UI Client FTP
Forum Updated to NodeBB v4.3 + New Features

UI Client FTP

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 380 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.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on last edited by
    #1

    Hi!

    I am trying to develope a classic client FTP. I want to have to QTreeView to show both file systems (local and remotes). I have resolved the local part with QFileSystem, but I don't know how to do the remote part. I want to have something like, for example, MobaXTerm or Putty, that have the directory tree in the remote part and you can select directly the files you want.

    How can I do this?

    Thank you very much guys!

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      I'm afraid you will have to build it manually, e.g. using QStandardItemModel

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • ivanicyI Offline
        ivanicyI Offline
        ivanicy
        wrote on last edited by
        #3

        Yes, I think so. But I was wondering if there was a better option because, when the remote has a lot of files, this system takes a long time to load and the interface is blocked. Thank you very much for you answer.

        B 1 Reply Last reply
        0
        • ivanicyI ivanicy

          Yes, I think so. But I was wondering if there was a better option because, when the remote has a lot of files, this system takes a long time to load and the interface is blocked. Thank you very much for you answer.

          B Offline
          B Offline
          Bonnie
          wrote on last edited by
          #4

          @ivanicy Why would the interface blocked? Aren't the ftp requests asynchronous?
          And I think you can find some projects from searching github.

          1 Reply Last reply
          0
          • ivanicyI Offline
            ivanicyI Offline
            ivanicy
            wrote on last edited by
            #5

            In the process of exploring the directories and mounting the items in the tree, it takes a long time and that time is blocked. Possibly I amdoing something wrong.

            JonBJ 1 Reply Last reply
            0
            • ivanicyI ivanicy

              In the process of exploring the directories and mounting the items in the tree, it takes a long time and that time is blocked. Possibly I amdoing something wrong.

              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by
              #6

              @ivanicy
              Well, it will take a while to send and receive the remote ftp queries, look at the remote's file system and collect the information.

              You should probably do the remote file system calls in its own thread. QFileSystemModel does exactly that for the local filesystem, and that will only be faster but it does it in a thread nonetheless for just this speed reason. Don't forget if you use a thread that must not attempt to access the UI (QTreeView) directly. You may have to be careful about accessing the QStandardItemModel or other model from the thread if it's also being used in the main thread, though it should be OK where it emits signals for the tree view as these will be safe cross-thread.

              Alternatively you may be able to just do remote calls from the main thread if you do them "a bit at a time". A lot of FTP-type explorers only examine/expand top-level directories initially, only when the user e.g. clicks in the tree view to expand further nodes does it go find their contents, This may well be preferable to gathering the complete tree at the outset.

              1 Reply Last reply
              1

              • Login

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