Obsolete Members for QAxFactory

QAxFactory 的以下成员已被弃用。提供这些成员是为了保持旧源代码的正常运行。我们强烈建议不要在新代码中使用它们。

(deprecated) QAXFACTORY_DEFAULT(Class, ClassID, InterfaceID, EventID, LibID, AppID)

宏文档

[deprecated] QAXFACTORY_DEFAULT(Class, ClassID, InterfaceID, EventID, LibID, AppID)

该宏已被弃用。我们强烈建议不要在新代码中使用它。

该宏可用于通过隐式声明的QAxFactory 实现,将单个QObject 子类Class 导出到该 COM 服务器。

该宏将类Class 输出为 COM 共类,CLSID 为ClassID 。属性和槽将通过 COM 接口声明,其 IID 为InterfaceID ,信号将通过 COM 事件接口声明,其 IID 为EventID 。所有声明都将在类型库中进行,类型库的 id 为LibID ,如果服务器是可执行服务器,则应用程序的 id 为AppID

#include <qaxfactory.h>

#include "theactivex.h"

QAXFACTORY_DEFAULT(
    TheActiveX,                               // widget class
    "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
    "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
    "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
    "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
    "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
)

注: 该类已被弃用,取而代之的是QAXFACTORY_BEGIN()。

另请参阅 QAXFACTORY_EXPORT() 。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.