1

I have created 2 QWidget and 1 QQuickWidget in main window. The QQuickWidget uses a source qml file. I want to set background transparent for two QWidgets and the QQuickWidget.

Can anyone help me to make the background of the QQuickWidget transparent so that my main window is also visible.

Daniel Langdon
  • 5,899
  • 4
  • 28
  • 48

1 Answers1

0
    const auto m_QuickWidgetPtr = new QQuickWidget(this);
    ...
    m_QuickWidgetPtr->setAttribute( Qt::WA_AlwaysStackOnTop );
    m_QuickWidgetPtr->setAttribute( Qt::WA_TranslucentBackground );
    m_QuickWidgetPtr->setClearColor( Qt::transparent );