이 페이지에서

QAxScriptEngine Class

QAxScriptEngine 클래스는 스크립트 엔진을 감싸는 래퍼 역할을 합니다. 더 보기...

헤더: #include <qaxscript.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS AxContainer)
target_link_libraries(mytarget PRIVATE Qt6::AxContainer)
qmake: QT += axcontainer
상속: QAxObject

공개 유형

enum State { Uninitialized, Initialized, Started, Connected, Disconnected, Closed }

공개 함수

QAxScriptEngine(const QString &language, QAxScript *script)
virtual ~QAxScriptEngine() override
void addItem(const QString &name)
bool hasIntrospection() const
bool isValid() const
long queryInterface(const QUuid &uuid, void **iface) const
QString scriptLanguage() const
void setState(QAxScriptEngine::State st)
QAxScriptEngine::State state() const

재구현된 보호 함수

virtual bool initialize(IUnknown **ptr) override

상세 설명

QAxScriptEngine 클래스의 모든 인스턴스는 특정 스크립트 언어의 스크립트 코드를 해석하는 인터프리터를 나타냅니다. 이 클래스는 일반적으로 직접 사용되지 않습니다. QAxScript 및 QAxScriptManager 클래스는 스크립트 코드를 처리하고 호출하는 데 편리한 함수를 제공합니다.

queryInterface()를 통해 스크립트 엔진에 직접 접근할 수 있습니다.

경고: 이 클래스는 bcc5.5 컴파일러에서는 사용할 수 없습니다.

QAxScript, QAxScriptManager, QAxBase 및 ActiveQt Framework도 참조하십시오 .

멤버 유형 문서

enum QAxScriptEngine::State

'State' 열거형은 스크립트 엔진이 가질 수 있는 다양한 상태를 정의합니다.

상수값설명
QAxScriptEngine::Uninitialized0스크립트가 생성되었으나 아직 초기화되지 않은 상태
QAxScriptEngine::Initialized5스크립트가 초기화되었으나 실행 중은 아닙니다
QAxScriptEngine::Started1스크립트는 코드를 실행할 수 있지만, 아직 이벤트를 처리하지는 않습니다
QAxScriptEngine::Connected2스크립트는 코드를 실행할 수 있으며, 이벤트를 처리할 수 있도록 연결되어 있습니다
QAxScriptEngine::Disconnected3스크립트가 로드되었으나, 이벤트 소스에 연결되어 있지 않습니다
QAxScriptEngine::Closed4스크립트가 닫혔습니다.

멤버 함수 문서

QAxScriptEngine::QAxScriptEngine(const QString &language, QAxScript *script)

script 에 있는 코드가 제공하는 language 의 스크립트 코드를 해석하는 QAxScriptEngine 객체를 생성합니다. 이는 일반적으로 loading a script 일 때 QAxScript 클래스에 의해 수행됩니다.

QAxScriptEngine 인스턴스는 항상 언어와 스크립트를 모두 가져야 합니다.

[override virtual noexcept] QAxScriptEngine::~QAxScriptEngine()

QAxScriptEngine 객체를 삭제하고, 할당된 모든 리소스를 해제합니다.

void QAxScriptEngine::addItem(const QString &name)

스크립트 엔진에 항목을 등록합니다. 스크립트 코드에서는 ` name`을 사용하여 이 항목을 참조할 수 있습니다.

bool QAxScriptEngine::hasIntrospection() const

스크립트 엔진이 인트로스펙션을 지원하는 경우 true를 반환하고, 그렇지 않은 경우 false를 반환합니다.

[override virtual protected] bool QAxScriptEngine::initialize(IUnknown **ptr)

QAxBase::initialize(IUnknown **ptr)를 재구현합니다.

bool QAxScriptEngine::isValid() const

스크립트 엔진이 올바르게 초기화된 경우 true를 반환하고, 그렇지 않은 경우 false를 반환합니다.

long QAxScriptEngine::queryInterface(const QUuid &uuid, void **iface) const

스크립트 엔진 개체에서 ` uuid ` 인터페이스를 요청하고, ` iface `의 값을 제공된 인터페이스로 설정하거나, 요청된 인터페이스를 제공할 수 없는 경우 0으로 설정합니다.

COM 객체의 QueryInterface 구현 결과를 반환합니다.

QString QAxScriptEngine::scriptLanguage() const

스크립트 언어를 반환합니다(예: "VBScript" 또는 "JScript").

void QAxScriptEngine::setState(QAxScriptEngine::State st)

스크립트 엔진의 상태를 ` st`로 설정합니다. 일반적으로 이 함수를 호출할 필요는 없습니다.

state()도 참조하십시오 .

QAxScriptEngine::State QAxScriptEngine::state() const

스크립트 엔진의 상태를 반환합니다.

setState()도 참조하십시오 .

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