Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to make a stock-market-like app?
QtWS25 Last Chance

How to make a stock-market-like app?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 634 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.
  • B Offline
    B Offline
    Bayesky
    wrote on 26 Apr 2019, 14:53 last edited by
    #1

    I want to make an app which could receive data from server once a second automatically when open it. I don't have any ideas to build it. Use RESTful API or something?
    Many thanks.

    P 1 Reply Last reply 26 Apr 2019, 15:07
    0
    • B Bayesky
      26 Apr 2019, 14:53

      I want to make an app which could receive data from server once a second automatically when open it. I don't have any ideas to build it. Use RESTful API or something?
      Many thanks.

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 26 Apr 2019, 15:07 last edited by
      #2

      @Bayesky said in How to make a stock-market-like app?:

      app which could receive data from server

      Are both the client app and the server things that you can develop?

      If so, I can think of 2 approaches maybe:

      1. use MQTT and the publish/subscribe paradigm -> your client will subscribe to whatever topic(s) you want on start and then it will receive any updates whenever the server publish new data on such topic(s)
      2. use WebSocket protocol so to have full-duplex communication channels over a single TCP connection

      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
      3
      • B Offline
        B Offline
        Bayesky
        wrote on 29 Apr 2019, 01:35 last edited by
        #3

        @Pablo-J-Rogina
        According to your useful advice, I installed Redis on the server and hiredis on my Mac. When I use gcc -o RedisTest RedisTest.c -lhiredis, it works well.
        But when I added this library into Qt ( use LIBS += -L/usr/local/lib/ -lhiredis ), an error occurred which said 'hiredis/hiredis.h' file not found.
        How should I do to solve this problem?

        A 1 Reply Last reply 29 Apr 2019, 06:11
        0
        • B Bayesky
          29 Apr 2019, 01:35

          @Pablo-J-Rogina
          According to your useful advice, I installed Redis on the server and hiredis on my Mac. When I use gcc -o RedisTest RedisTest.c -lhiredis, it works well.
          But when I added this library into Qt ( use LIBS += -L/usr/local/lib/ -lhiredis ), an error occurred which said 'hiredis/hiredis.h' file not found.
          How should I do to solve this problem?

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 29 Apr 2019, 06:11 last edited by
          #4

          @Bayesky

          you need to add an INCLUDEPATH in your pro file to point to the directory where the includes are found.

          The LIBS line looks already good, but is used by the linker at a later step.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • B Offline
            B Offline
            Bayesky
            wrote on 30 Apr 2019, 12:06 last edited by
            #5

            @aha_1980 said in How to make a stock-market-like app?:

            ectory where the includes are found.

            Thank you. I have succeed in connection!

            1 Reply Last reply
            1

            3/5

            29 Apr 2019, 01:35

            • Login

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