Hi all,
What is the correct strategy for creating a graphical component as a plugin?
For example, if I have an application with two components in the main window, (a browse tree on the left, and a viewing pane on the right), I want to implement each component as a plugin, so that I can drop in new components withou re-compiling my main app.
So I get the view plugin:
ViewInterface *iView = qobject_cast<ViewInterface *>(plugin);
ViewInterface *iView = qobject_cast<ViewInterface *>(plugin);
To copy to clipboard, switch view to plain text mode
Then get an instance of the view widget:
if (iView){
viewWidget = iView->createWidget(this);
}
if (iView){
viewWidget = iView->createWidget(this);
}
To copy to clipboard, switch view to plain text mode
where viewWidget is a QWidget*
So now I can insert the plugin into my layout, but I can't access any of the plugins methods because it's now a QWidget, not a Viewer!
I guess this question is more conceptual than technical... any advice?
-Chris
Bookmarks