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

Qt FTP Solution

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 5 Posters 8.4k Views 3 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by mrjj
    #7

    Hi
    If you go libcurl route, maybe this will help
    https://github.com/grynko/curlite

    Please see next post.

    VRoninV 1 Reply Last reply
    1
    • mrjjM mrjj

      Hi
      If you go libcurl route, maybe this will help
      https://github.com/grynko/curlite

      Please see next post.

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #8

      @mrjj https://github.com/jpbarrette/curlpp is more mature but I still didn't manage to get a reliable and robust build on Windows (MSVC2013), great on other platforms though

      "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
      1
      • K Offline
        K Offline
        Kats
        wrote on last edited by Kats
        #9

        Well, I managed to get the QFtp working regardless. I have no ambition not to use it simply due to the time constraints on my project. I'm 100% sure there are better, more robust solutions out there, but I simply don't have the time to hunt and search through all of them. I'm already using the Qt Library, it's just easier to keep with the theme since QFtp objects are so easy to work with and they have the level of control that I need.

        Before Qt, I'd messed with FtpLib, Lib Ftp and LibCurl and couldn't get any of them to compile properly. It became 2 or 3 days of an absolute nightmare with zero results, so I just went with a trusted option that actually works: Qt.

        Side Note: Thank you guys so much. This community is so much more pleasant to work with than StackOverflow. You're actually informative!

        VRoninV 1 Reply Last reply
        1
        • K Kats

          Well, I managed to get the QFtp working regardless. I have no ambition not to use it simply due to the time constraints on my project. I'm 100% sure there are better, more robust solutions out there, but I simply don't have the time to hunt and search through all of them. I'm already using the Qt Library, it's just easier to keep with the theme since QFtp objects are so easy to work with and they have the level of control that I need.

          Before Qt, I'd messed with FtpLib, Lib Ftp and LibCurl and couldn't get any of them to compile properly. It became 2 or 3 days of an absolute nightmare with zero results, so I just went with a trusted option that actually works: Qt.

          Side Note: Thank you guys so much. This community is so much more pleasant to work with than StackOverflow. You're actually informative!

          VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #10

          @Kats said in Qt FTP Solution:

          Before Qt, I'd messed with [..] LibCurl and couldn't get any of them to compile properly

          example commands to build and install libcurl on Windows MSVC 2013 32bit
          assuming you have openssl in C:\openssl and zlib in C:\zlibBuild this will place the result in C:\libcurl

          pushd C:\
          CALL "C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat"
          popd
          echo on
          mkdir deps
          xcopy C:\openssl\* deps\ /S /Y
          xcopy C:\zlibBuild\* deps\ /S /Y
          cd winbuild
          nmake /f Makefile.vc mode=dll WITH_DEVEL=../deps WITH_SSL=dll WITH_ZLIB=dll VC=12 DEBUG=yes 
          nmake /f Makefile.vc mode=dll WITH_DEVEL=../deps WITH_SSL=dll WITH_ZLIB=dll VC=12 DEBUG=no
          cd ..\
          if not exist "C:\libcurl" mkdir "C:\libcurl"
          if not exist "C:\libcurl\include" mkdir "C:\libcurl\include"
          xcopy include\* C:\libcurl\include /S /Y
          xcopy builds\libcurl-vc12-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi\* C:\libcurl\ /S /Y
          xcopy builds\libcurl-vc12-x86-release-dll-ssl-dll-zlib-dll-ipv6-sspi\* C:\libcurl\ /S /Y
          

          "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
          3
          • K Offline
            K Offline
            Kats
            wrote on last edited by
            #11

            Okay, I'm running into an extremely large problem, now.

            I had QFtp working where it would connect to the server perfectly fine, but when I come back into the office today and pull up the build, it DOES NOT CONNECT. When I use it, it doesn't even pretend like it's trying to connect.

            I've been using a threaded loop to monitor QFtp's state and it always stays at 3. I have a slot setup to catch any changes, but it never does. The Ftp server also never sees the attempted connection either.

            I have no idea what's going on because apparently this is a problem that nobody in the history of Qt has ever had before.

            mrjjM 1 Reply Last reply
            0
            • K Kats

              Okay, I'm running into an extremely large problem, now.

              I had QFtp working where it would connect to the server perfectly fine, but when I come back into the office today and pull up the build, it DOES NOT CONNECT. When I use it, it doesn't even pretend like it's trying to connect.

              I've been using a threaded loop to monitor QFtp's state and it always stays at 3. I have a slot setup to catch any changes, but it never does. The Ftp server also never sees the attempted connection either.

              I have no idea what's going on because apparently this is a problem that nobody in the history of Qt has ever had before.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #12

              @Kats
              Hi
              If you restart whole pc, will it then connect again?
              Also make sure firewall or scanner is not blocking it.

              1 Reply Last reply
              2
              • K Offline
                K Offline
                Kats
                wrote on last edited by
                #13

                I can connect to the server through every other FTP service on my computer (all browsers and FileZilla connect instantly).

                QFtp is the only service that does not connect. It's exhibiting the exact same behavior as if I'm attempting to connect to the wrong address, but this is simply not possible because the address I'm connecting to (192.168.1.26) is available to all local devices. I'm using the exact same address and credentials as on everything else but is acting like the ftp server doesn't exist.

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

                  My money is on firewall blocking it

                  "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
                  1
                  • K Offline
                    K Offline
                    Kats
                    wrote on last edited by Kats
                    #15

                    It was not a firewall. It's because QFtp objects apparently can't be instantiated from inside of a thread. They can only be created inside the main thread of the program, regardless of their scope. Fixing that solved my issue and I've since completed what I was working on.

                    1 Reply Last reply
                    1
                    • K Offline
                      K Offline
                      Kats
                      wrote on last edited by
                      #16

                      Hey, again, I can't thank you guys enough for you input on helping me troubleshoot this project, but it's helped both show me a newfound appreciation (and possibly future dependency) for Qt as well as streamline my current production environment, which is really helpful!

                      So thanks so much, even if my frustration peaked through every now and again.

                      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