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 作为具有 CLSIDClassID 的 COM 协同类进行导出。 属性和槽将通过 IID 为InterfaceID 的 COM 接口进行声明,信号将通过 IID 为EventID 的 COM 事件接口进行声明。所有声明都将位于 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()。

© 2026 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.