QCanBusFactory 类是用作 CAN Bus 插件的插件接口的工厂类。 更多...
| 头: | #include <QCanBusFactory> | 
| qmake: | QT += serialbus | 
| Since: | Qt 5.8 | 
| 继承者: | 
该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
该类在 Qt 5.8 引入。
| virtual QCanBusDevice * | createDevice (const QString & interfaceName , QString * errorMessage ) const = 0 | 
所有插件必须实现此工厂类提供的函数。
此类已弃用,应使用 QCanBusFactoryV2 代替。
另请参阅 QCanBusFactoryV2 .
[pure virtual]
						
						
							
								QCanBusDevice
							
						
						*QCanBusFactory::
						
							createDevice
						
						(const
						
							
								QString
							
						
						&
						
							interfaceName
						
						,
						
							
								QString
							
						
						*
						
							errorMessage
						
						) const
						
					创建新的 QCanBusDevice . The caller must take ownership of the returned pointer.
interfaceName is the CAN interface name and errorMessage contains an error description in case of failure.
						若工厂无法创建插件,返回
						
nullptr
						
						.