Mesh Deformer的架 构若想参照OpenFlipper来实现,首先需要了解Qt plugin system的结构以及如何编写qt plugins.
以下摘抄了Qt文档中的部分内容(只与自己想要实现的功能相关的内容)
The Lower-Level API: Extending Qt Applications
Not only Qt itself but also Qt application can be extended through plugins. This requires the application to detect and load plugins using QPluginLoader. In that context, plugins may provide arbitrary functionality and are not limited to database drivers, image formats, text codecs, styles, and the other types of plugin that extend Qt's functionality.
Making an application extensible through plugins involves the following steps:
- Define a set of interfaces (classes with only pure virtual functions) used to talk to the plugins.
- Use the Q_DECLARE_INTERFACE() macro to tell Qt's