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 met

本文介绍了如何参照OpenFlipper实现Mesh Deformer架构,关键在于理解Qt的插件系统。通过定义接口、使用QPluginLoader加载插件以及qobject_cast测试插件功能,详细阐述了创建和使用Qt插件的步骤,并提供了测试程序的代码示例。
最低0.47元/天 解锁文章
741

被折叠的 条评论
为什么被折叠?



