Open probonopd opened 2 years ago
Qt plugins are meant for that. If you have a main program which would look into some specific directory and check for certain metadata to be present in the qt plugin then you can simply load it and run it. The plugin will have access to the main program's memory and context.
This is what the Qt Creator does for changing styles when you put a style plugin near it.
The logic is that the qt plugin implements a abstract class. You should have definition to this abstract class and can cast it to check if the correct type of plugin you desire is loaded.
Thanks @antony-jr so do you think we could override QKeySequence::toString()
in https://github.com/helloSystem/QtPlugin/? Where would we need to put the code? Or would we need another type of Qt Plugin, not a Qt Platform Plugin?
Thanks @antony-jr so do you think we could override
QKeySequence::toString()
in https://github.com/helloSystem/QtPlugin/? Where would we need to put the code? Or would we need another type of Qt Plugin, not a Qt Platform Plugin?
We could try.
Where would one have to put the code?
Since @antony-jr has been injecting menu items using Qt plugins rather than
LD_PRELOAD
I wonder if it would be possible to do what this repo does but as a Qt plugin. Would feel a bit cleaner to me, although the current solution appears to work fine.