Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to make a stock-market-like app?
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?
Pablo J. Rogina last edited by
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:
- 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)
- use WebSocket protocol so to have full-duplex communication channels over a single TCP connection
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?
you need to add an
INCLUDEPATHin your pro file to point to the directory where the includes are found.
LIBSline looks already good, but is used by the linker at a later step.
ectory where the includes are found.
Thank you. I have succeed in connection!