As you say and as can be deduced from how you formulated your question, you are new to programming.
The task you want to achieve is by no means a beginner task.
What you are referring to as a use case for an IPC (Inter process communication) and there are various possibilities, which one to use depends on your needs.
No one of there options is simple for a beginner as you need to be familiar with various programming concepts.
A good place to start would be here:
https://en.wikipedia.org/wiki/Inter-..._communication
In addition there is DBus, and a Qt implementation of it QDBus:http://doc.qt.io/qt-5/qtdbus-index.html