Solved Exchanging data between plugin and interface class with the same plugin instance created in first use.
-
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]
-
and what makes you think that it is a good idea to list a couple of moderators arbitrarily in your post?
- Some of them have not been in the forum for a long time.
- Your post draw certainly the attention of mods quite quickly as you see.
- Anyway , most likely it will not help you to get answers faster or better than others.
-
@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
-
@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. -
@VRonin
This is a link to the zip file on github.
https://github.com/kpkale/plugintrial.git -
@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.
-
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; }
-
@mrjj
OH!! I just missed that point.
I corrected that and now it works.
Thanks.