Results 1 to 4 of 4

Thread: Possible for QSharedMemory to be shared by a QT application and a non-QT process?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Smile Possible for QSharedMemory to be shared by a QT application and a non-QT process?

    I'm a QT newbie so apologies if I'm missing something basic. I have a QApplication that calls an external executable. This executable will keep running infinitely, passing data to this QApplication through stdout, unless it's manually exited from by the user running it from console. This process does not wait for stdin while it is running (it's a simple c++ code that's running as an executable that has a while loop).

    I want to be able to modify this executable's behavior at runtime by being able to send some form of signal (any kind of signal, even a single byte. Not to be confused with QT's signal/slot) from the QApplication to the external process. I read about QT's IPC and I think QSharedMemory is the easiest way to achieve this. I cannot use any kind of pipes etc since the process is not waiting for stdin.

    Is it possible for there to be a QSharedMemory that is shared by the QApplication as a well as a process running externally that is not a QT application. If yes, are there any example someone can point me to; I tried to find some but couldn't. If not, what other options might work in my specific scenario?

    Thanks in advance

    EDIT: Just to be more clearer, I want to be able to modify the executable's behaviour by making it do other things, than what it's doing at a given time. This can probably be achieved by sending a number or a char that specifies something. The QApplication can close this executable through QProcess so that is not required to be done by sending any signal. If I use stdin of the executable to listen to the signal sent by the QApplication, will it interfere with the stdout of that executable which is being read by the QApplication? I presume not, since they're separate channels, but just wanted to be sure.
    Last edited by anshulvj; 25th June 2015 at 23:23.

Similar Threads

  1. Depoyment Qt application as Shared Library
    By norrbotten68 in forum Qt Programming
    Replies: 2
    Last Post: 23rd April 2014, 00:13
  2. Shared Object In Qt and Linking to main application
    By Ashutosh2k1 in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2011, 10:36
  3. How to deploy application using shared library in Linux
    By cutie.monkey in forum Installation and Deployment
    Replies: 9
    Last Post: 21st January 2010, 18:41
  4. Application with shared library problem in linux
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2010, 07:20
  5. Replies: 3
    Last Post: 6th January 2010, 16:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.