Two of my plugins are very similar. Exactly I started them from same code. Each of them creates object of class inheriting QGraphicsItem. This class draws picture from PNG file attached to resource. Then each plugin sends item pointer to main application which adds it to common QGraphicsScene. This all works except one unexpected effect.
In both plugins names of PNG files are the same. I expected that each plugin will get picture from it's own resource. Pictures are different - each plugin is assembled from it's own project tree (of course resource files are different too). But after graphics scene drew for first time - I saw 2 equally pictures. Actually 2nd plugin got picture from 1st plugin resource. Or from main application if resources were taken by main app.
I just removed 1st plugin from application directory. Then started app with only 2nd plugin - I saw proper picture from 2nd plugin's resource. Why I did not see it after both plugins were loaded?
What is wrong here? Are resources from plugins exported to main app in some way? Or mistake is somewhere else (this is just another day of 14 hours working time)?
Of course I can give different names to pictures and force item constructor use these names. But this is not so good. Plugins can be created by different people and file names can mix again later.