+ Reply to Thread
Results 1 to 4 of 4

Thread: How C application send notification to Qt application on Linux

  1. #1
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default How C application send notification to Qt application on Linux

    Hi,
    I have a C application which wants to notify qt application for some value changed on Linux OS platform, what is the best way to do it, please help.

    Regards,

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,699
    Thanks
    21
    Thanked 417 Times in 410 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How C application send notification to Qt application on Linux

    The "best way" depends on your requirements.
    What you are looking for is a form of IPC (Inter process communication).
    Search google for "IPC methods linux".
    One good link I found is this: https://stackoverflow.com/questions/...chnique-to-use
    But have a look at google - there are many other good sources about IPC on the internet.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How C application send notification to Qt application on Linux

    Hi,
    Thanks for your quick reply.
    But I would like to have some notification on my qt application side when C application wants to send some message.
    I want to avoid polling on my Qt application side.

    Please reply if something similar is possible, otherwise I can do this in different thread and when value is really changed I can notify main thread for that notification.

    Thanks,

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,699
    Thanks
    21
    Thanked 417 Times in 410 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How C application send notification to Qt application on Linux

    Have a look a DBus - or QDBus.(http://doc.qt.io/qt-5/qtdbus-index.html)
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

+ Reply to Thread

Similar Threads

  1. Replies: 3
    Last Post: 20th July 2013, 18:25
  2. Send qt gui application in background..
    By ajaysaini.sgvu in forum Qt Programming
    Replies: 3
    Last Post: 18th August 2012, 08:19
  3. Windows Shutdown Notification of Console Application
    By qtYoda in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2012, 17:50
  4. send an email from my Qt application
    By omega36 in forum Qt Programming
    Replies: 14
    Last Post: 22nd December 2008, 17:06
  5. Replies: 3
    Last Post: 6th February 2006, 17:41

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