Ok, I think I can get away with this if I seperate things one more step further:
.
+-----------+ +-------------------+ +------------------+
| Plugin | | Abstract class | | Abstract base |
| Interface | | knows about slots | | class with slots |
+-----------+ +-------------------+ +------------------+
| | |
+---------+ +-------------------+ +----------------+
| (a,b...)| | sub-class | | implementation |
+---------+ +-------------------+ +----------------+
.
+-----------+ +-------------------+ +------------------+
| Plugin | | Abstract class | | Abstract base |
| Interface | | knows about slots | | class with slots |
+-----------+ +-------------------+ +------------------+
| | |
+---------+ +-------------------+ +----------------+
| Plugins |----| QWidget/QGLWidget |-| plugin slots |
| (a,b...)| | sub-class | | implementation |
+---------+ +-------------------+ +----------------+
To copy to clipboard, switch view to plain text mode
This way, my plugin can pass a QWidget, which would have an implementation class of slots. I think the nature of my slots would allow such a relationship. It may get tricky, depending on the plugin, as far as gaining access to the QWidget itself (perhaps a pointer to the QWidget sub-class in the slots implementation?), but I think it's doable. The "abstract class that knows about slots" does not inherit QObject or similar, but it knows about the abstract base class with slots (and includes it as a pointer variable).
EDIT: This structure compiles. I think I have a solution. Thanks for the idea
.
Bookmarks