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();
qt_activex_widget->setGeometry(100,100,500,500);
qt_activex_widget->setControl("MyControl");
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->setGeometry(200,200,80,80);
test->setStyleSheet("background-color: rgba(255, 0, 0,50)");
//test->setAttribute(Qt::WA_TranslucentBackground);
//test->setWindowFlags(Qt::FramelessWindowHint);qt_activex_widget->show();@
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
Ben