Please nominate your Qt Champions for 2021!

Overlay semi-transparent widget on top of QAxWidget

  • Hi All,
    I'm trying to overlay a semi transparent widget on top of a QAxWidget.
    Here is the code that I'm using :

    @ QAxWidget *qt_activex_widget = new QAxWidget();
    CComPtr<IMyControl> disp_ctrl;
    QUuid uuid(__uuidof(disp_ctrl));
    HRESULT hr = qt_activex_widget->queryInterface(uuid, (void **)&disp_ctrl);
    if ( FAILED( hr ) ){
    return E_FAIL;
    if (FAILED(disp_ctrl->Initialise(e_dci_directx, view, m_input_modes_proxy, nullptr))) {
    return E_FAIL;

    QWidget *test = new QWidget(qt_activex_widget);
    test->setStyleSheet("background-color: rgba(255, 0, 0,50)");


    The control is shown properly but the "test" widget that is supposed to be red and semi-transparent is completely opaque.

    Setting on the test widget the FramelessWindowHint window flag and the WA_TranslucentBackgroung property will show a completely opaque white widget.

    Any ideas?
    Is it even possible to do what I'm trying to do ?

    Thanks a lot for your help,

    Kind regards


Log in to reply