I want to share a variable across two different Qt applications. I am thinking of using QSharedMemory for this purpose. The problem I am facing is to identify the shared memory regions in the Qt applications. How do I ensure that both applications use the same Shared Memory?
Share
The shared memory area is identified by a key – a string argument passed to the constructor, or set later using
setKey.You need to generate a key and pass its value to both applications; using that, they will both access the same shared memory.