Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Exchanging data between plugin and interface class with the same plugin instance created in first use.
Forum Updated to NodeBB v4.3 + New Features

Exchanging data between plugin and interface class with the same plugin instance created in first use.

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 5 Posters 808 Views 3 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.
  • T Offline
    T Offline
    TheCrowKaka
    wrote on last edited by VRonin
    #1

    Hello

    I am still testing how to use plugins for my application.
    I am having an application A and a plugin B. This plugin is an application plugin and has a Dialog in it.

    I am able to execute the plugin B from application A thereby loading the dialog in B and send data from A to B the first time.
    I am able to send data from plugin B Dialog to the A application many times.
    However when I try to send a data from application A to the already existing dialog in plugin B, it does not send it to the existing dialog of plugin B but it creates a new instanace of the Dialog of plugin B and sends data to that new instance. Each time i try to send the Data from A to Dialog of Plugin B, it creates a new instance of the Plugin B Dialog.

    How can I avoid creating this new instance and have data sent from application A to the existing Dialog in plugin B?

    Can anyone guide me on this.
    I have attached the zip file with source code for the Testing App and Testing plugin. I am using this on Windows 10 with Qt5.10.1 MinGW
    [0_1539600548743_PluginTrials.zip](Uploading 100%)
    Thanks for your help.

    [VRonin: removed spamtag to some of the users of the forum]

    A Qt Enthusiastic...

    K VRoninV 2 Replies Last reply
    0
    • T TheCrowKaka

      Hello

      I am still testing how to use plugins for my application.
      I am having an application A and a plugin B. This plugin is an application plugin and has a Dialog in it.

      I am able to execute the plugin B from application A thereby loading the dialog in B and send data from A to B the first time.
      I am able to send data from plugin B Dialog to the A application many times.
      However when I try to send a data from application A to the already existing dialog in plugin B, it does not send it to the existing dialog of plugin B but it creates a new instanace of the Dialog of plugin B and sends data to that new instance. Each time i try to send the Data from A to Dialog of Plugin B, it creates a new instance of the Plugin B Dialog.

      How can I avoid creating this new instance and have data sent from application A to the existing Dialog in plugin B?

      Can anyone guide me on this.
      I have attached the zip file with source code for the Testing App and Testing plugin. I am using this on Windows 10 with Qt5.10.1 MinGW
      [0_1539600548743_PluginTrials.zip](Uploading 100%)
      Thanks for your help.

      [VRonin: removed spamtag to some of the users of the forum]

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

      @TheCrowKaka

      and what makes you think that it is a good idea to list a couple of moderators arbitrarily in your post?

      1. Some of them have not been in the forum for a long time.
      2. Your post draw certainly the attention of mods quite quickly as you see.
      3. Anyway , most likely it will not help you to get answers faster or better than others.

      Vote the answer(s) that helped you to solve your issue(s)

      T 1 Reply Last reply
      3
      • T TheCrowKaka

        Hello

        I am still testing how to use plugins for my application.
        I am having an application A and a plugin B. This plugin is an application plugin and has a Dialog in it.

        I am able to execute the plugin B from application A thereby loading the dialog in B and send data from A to B the first time.
        I am able to send data from plugin B Dialog to the A application many times.
        However when I try to send a data from application A to the already existing dialog in plugin B, it does not send it to the existing dialog of plugin B but it creates a new instanace of the Dialog of plugin B and sends data to that new instance. Each time i try to send the Data from A to Dialog of Plugin B, it creates a new instance of the Plugin B Dialog.

        How can I avoid creating this new instance and have data sent from application A to the existing Dialog in plugin B?

        Can anyone guide me on this.
        I have attached the zip file with source code for the Testing App and Testing plugin. I am using this on Windows 10 with Qt5.10.1 MinGW
        [0_1539600548743_PluginTrials.zip](Uploading 100%)
        Thanks for your help.

        [VRonin: removed spamtag to some of the users of the forum]

        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        @TheCrowKaka said in Exchanging data between plugin and interface class with the same plugin instance created in first use.:

        I have attached the zip file with source code for the Testing App and Testing plugin

        That doesn't work, you can use https://github.com/ or something similar to share complex projects

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        T 1 Reply Last reply
        0
        • K koahnig

          @TheCrowKaka

          and what makes you think that it is a good idea to list a couple of moderators arbitrarily in your post?

          1. Some of them have not been in the forum for a long time.
          2. Your post draw certainly the attention of mods quite quickly as you see.
          3. Anyway , most likely it will not help you to get answers faster or better than others.
          T Offline
          T Offline
          TheCrowKaka
          wrote on last edited by
          #4

          @koahnig
          Sorry for doing that. I just did not know if it is OK or not OK to do that. Just was desperate to get an answer.
          I will not do that in the future.
          However, in case I have a post for which I have not received any answer to close it, can I then mark it to some moderators to draw their attention?
          Thanks for your guidance.

          A Qt Enthusiastic...

          jsulmJ 1 Reply Last reply
          0
          • VRoninV VRonin

            @TheCrowKaka said in Exchanging data between plugin and interface class with the same plugin instance created in first use.:

            I have attached the zip file with source code for the Testing App and Testing plugin

            That doesn't work, you can use https://github.com/ or something similar to share complex projects

            T Offline
            T Offline
            TheCrowKaka
            wrote on last edited by
            #5

            @VRonin
            This is a link to the zip file on github.
            https://github.com/kpkale/plugintrial.git

            A Qt Enthusiastic...

            1 Reply Last reply
            0
            • T TheCrowKaka

              @koahnig
              Sorry for doing that. I just did not know if it is OK or not OK to do that. Just was desperate to get an answer.
              I will not do that in the future.
              However, in case I have a post for which I have not received any answer to close it, can I then mark it to some moderators to draw their attention?
              Thanks for your guidance.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @TheCrowKaka said in Exchanging data between plugin and interface class with the same plugin instance created in first use.:

              can I then mark it to some moderators to draw their attention

              No, if a moderator has an answer he/she will write it, no need to contact directly. You can refresh you thread adding one more post.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2
              • mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi
                You create a new dialog each time. Do you mean that ?

                void Myechoplugin::mygastro(const QString &message)
                {
                    mydiag = new plugtestdialog(); <<< new one every time
                    connect(mydiag,SIGNAL(TinkerValue(QString)),this,SLOT(TinkerValue(QString)));
                    mydiag->Setvalues(message);
                    mydiag->show();
                //    QString retmessage = mydiag->newvalue;
                //    mydiag->close();
                //    mydiag->deleteLater();
                    //    return retmessage;
                }
                
                T 1 Reply Last reply
                2
                • mrjjM mrjj

                  Hi
                  You create a new dialog each time. Do you mean that ?

                  void Myechoplugin::mygastro(const QString &message)
                  {
                      mydiag = new plugtestdialog(); <<< new one every time
                      connect(mydiag,SIGNAL(TinkerValue(QString)),this,SLOT(TinkerValue(QString)));
                      mydiag->Setvalues(message);
                      mydiag->show();
                  //    QString retmessage = mydiag->newvalue;
                  //    mydiag->close();
                  //    mydiag->deleteLater();
                      //    return retmessage;
                  }
                  
                  T Offline
                  T Offline
                  TheCrowKaka
                  wrote on last edited by
                  #8

                  @mrjj
                  OH!! I just missed that point.
                  I corrected that and now it works.
                  Thanks.

                  A Qt Enthusiastic...

                  1 Reply Last reply
                  1

                  • Login

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