Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED]How to Pass Signal from one .so file to another?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]How to Pass Signal from one .so file to another?

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 3 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dreamerindia
    wrote on last edited by
    #1

    Hi,
    How to have communication between two .so files.

    I want to send signal from one .so file to another .so file. both .so files are used in the same project.

    ~Ravivarman~

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Technically, you don't send signals to .so files. You do it on QObject derivatives.

      Anyway, just use the class from both libraries and connect them. You already do it when using the various libraries from Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dreamerindia
        wrote on last edited by
        #3

        Dear,

        If we use as interface,

        @
        #include "BackPlaneInterface.h"
        IntefaceBackPlane *IBackPlane;

          QPluginLoader loaderBck("libBackPlaneInterface.so",this);
            IBackPlane = qobject_cast<IntefaceBackPlane*>(loaderBck.instance());
            IBackPlane->InitializeBpObject();
        

        @
        i think we can, But when using as below

        First .so,

        @QLibrary *m_objPTLibrary;
        m_objPTLibrary = new QLibrary("./libQmaxPTLibrary.so");
        typedef void (*pf1)(QString,QString);
        pf1 InitPTLibrary = (pf1)m_objPTLibrary->resolve("InitPTLibrary");@
        

        Second .so,

          @QLibrary *MyLib;
           MyLib = new QLibrary("./libGPIOEvent.so");
          typedef void (*pf2)(QWidget*,QString,QString,int*);
          pf2 InvokeGPIOEvent = (pf2)MyLib->resolve("InvokeGPIOEvent");@
        

        How to connect between This?

        ~Ravivarman~

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AcerExtensa
          wrote on last edited by
          #4

          [quote author="dreamerindia" date="1377164054"]Dear,

          i think we can, But when using as below

          First .so,

          @QLibrary *m_objPTLibrary;
          m_objPTLibrary = new QLibrary("./libQmaxPTLibrary.so");
          typedef void (*pf1)(QString,QString);
          pf1 InitPTLibrary = (pf1)m_objPTLibrary->resolve("InitPTLibrary");@
          

          Second .so,

            @QLibrary *MyLib;
             MyLib = new QLibrary("./libGPIOEvent.so");
            typedef void (*pf2)(QWidget*,QString,QString,int*);
            pf2 InvokeGPIOEvent = (pf2)MyLib->resolve("InvokeGPIOEvent");@
          

          How to connect between This?
          [/quote]

          You can use signal/slot connection between QObject derived classes.... What you are doing is simply resolving functions from library.... functions != objects

          in Qt5 you can connect signal from derived QObject class to normal function, but you can't connect to simple functions with each over...

          God is Real unless explicitly declared as Integer.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved