Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. proxies+QML

proxies+QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
proxiesqml
5 Posts 4 Posters 3.0k 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.
  • A Offline
    A Offline
    AtoZ
    wrote on 2 Aug 2018, 19:35 last edited by
    #1

    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.

    J 1 Reply Last reply 3 Aug 2018, 05:24
    0
    • A AtoZ
      2 Aug 2018, 19:35

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 3 Aug 2018, 05:24 last edited by
      #2

      @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

      A 1 Reply Last reply 4 Aug 2018, 09:03
      1
      • J jsulm
        3 Aug 2018, 05:24

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

        A Offline
        A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on 4 Aug 2018, 09:03 last edited by
        #3

        @jsulm Moved to QML&Quick :)

        Qt has to stay free or it will die.

        A 1 Reply Last reply 5 Aug 2018, 17:14
        0
        • A aha_1980
          4 Aug 2018, 09:03

          @jsulm Moved to QML&Quick :)

          A Offline
          A Offline
          AtoZ
          wrote on 5 Aug 2018, 17:14 last edited by
          #4

          @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!

          P 1 Reply Last reply 7 Aug 2018, 14:35
          0
          • A AtoZ
            5 Aug 2018, 17:14

            @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!

            P Offline
            P Offline
            Pablo J. Rogina
            wrote on 7 Aug 2018, 14:35 last edited by
            #5

            @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
            0

            5/5

            7 Aug 2018, 14:35

            • Login

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