Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved proxies+QML

    QML and Qt Quick
    proxies qml
    4
    5
    1138
    Loading More Posts
    • 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.
    • A
      AtoZ last edited by

      I want to use qnetworkproxyfactory to direct networkflow to use proxy server for external http/s calls and not to use it for internal http/s calls. The project I am working on is a Q Quick project, which mostly built upon qml and javascript, so I am wondering where I should add the networkproxyfactory piece. Shall I create a subclass of qnetworkproxyfactory and use it in main.cpp (this is the way I am trying) or actually I have to modify and recompile network module (which I am trying to avoid) - because I am unsure of how to use qnetworkproxyfactory to track the http/https calls which are actually set in qml. Currently I just hard code the URLs. What suggestion do you have? Thanks.

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @AtoZ last edited by

        @AtoZ You should not post such questions in "C++ Gurus" forum, as it is unrelated to C++ programming language.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        aha_1980 1 Reply Last reply Reply Quote 1
        • aha_1980
          aha_1980 Lifetime Qt Champion @jsulm last edited by

          @jsulm Moved to QML&Quick :)

          Qt has to stay free or it will die.

          A 1 Reply Last reply Reply Quote 0
          • A
            AtoZ @aha_1980 last edited by

            @aha_1980 @aha_1980 Thanks fro taking care of that! However, the reason I posted the question here is that I thought I would have to subclass QtNetworkProxyFactory c++ code and use its queryProxy function to filter out the URLs - to tell whether they are internal or external, then decide to use Proxy to not. SystemConfig is really a good thing to take advantage of, but our requirement is for our application to work on all kinds of mobile devices - Windows, iOS and Android, so preferably we can handle Proxy server without using SystemConfig. I have subclassed the QtNetworkProxyFactory , and overloaded its queryProxy function, but I am not sure where and how to use the subclass and its queryProxy function in main.cpp. Thanks!

            Pablo J. Rogina 1 Reply Last reply Reply Quote 0
            • Pablo J. Rogina
              Pablo J. Rogina @AtoZ last edited by

              @AtoZ you may want to take a log at this blog post as it may help...

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              1 Reply Last reply Reply Quote 0
              • First post
                Last post