Sur cette page

QAxSelect Class

La classe QAxSelect fournit une boîte de dialogue de sélection pour les composants COM enregistrés. Plus d'informations...

En-tête : #include <QAxSelect>
CMake : find_package(Qt6 REQUIRED COMPONENTS AxContainer)
target_link_libraries(mytarget PRIVATE Qt6::AxContainer)
qmake : QT += axcontainer
Héritages : QDialog

Types publics

enum SandboxingLevel { SandboxingNone, SandboxingProcess, SandboxingLowIntegrity, SandboxingAppContainer }

Fonctions publiques

QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags())
virtual ~QAxSelect() override
QString clsid() const
QAxSelect::SandboxingLevel sandboxingLevel() const

Description détaillée

La boîte de dialogue QAxSelect peut être utilisée pour permettre aux utilisateurs de parcourir les composants COM enregistrés du système et d'en sélectionner un. Elle fournit également une liste déroulante permettant de sélectionner le niveau de sandboxing souhaité. Le CLSID du composant sélectionné peut alors être utilisé dans l'application pour, par exemple, initialiser un site QAxWidget:

QAxSelect select;
if (select.exec()) {
    QAxWidget *container = new QAxWidget;
    container->setControl(select.clsid());
    container->show();
}

Voir également QAxWidget et ActiveQt Framework.

Documentation sur les types de membres

enum QAxSelect::SandboxingLevel

L'énumération SandboxingLevel définit le niveau souhaité de sandboxing ActiveX.

ConstanteValeurDescription
QAxSelect::SandboxingNone0Pas de sandboxing spécifique souhaité
QAxSelect::SandboxingProcess1Exécuter le contrôle ActiveX dans un processus séparé
QAxSelect::SandboxingLowIntegrity2Exécuter le contrôle ActiveX dans un processus séparé à faible intégrité
QAxSelect::SandboxingAppContainer3[depuis la version 6.5] Exécuter le contrôle ActiveX dans un processus séparé isolé de l'AppContainer

Le sandboxing requiert que l'ActiveX soit construit comme un EXE, ou comme une DLL avec l'AppID "DllSurrogate" activé.

Documentation des fonctions membres

[explicit] QAxSelect::QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags())

Construit un objet QAxSelect. Les drapeaux du widget parent de la boîte de dialogue et de la fenêtre peuvent être spécifiés en option avec les paramètres parent et flags, respectivement.

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

Détruit l'objet QAxSelect.

QString QAxSelect::clsid() const

Renvoie le CLSID du composant COM sélectionné.

QAxSelect::SandboxingLevel QAxSelect::sandboxingLevel() const

Renvoie le niveau de sandboxing souhaité pour le contrôle ActiveX.

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