Is there a way to make the window of a qml application transparent?
I\'m looking for a detailed description on how to draw simple s
I'm using Qt 5.3 with both C++ and QML and found that I needed to call QQuickWindow::setDefaultAlphaBuffer. This has to be done before creating the first QQuickWindow
, so in C++, not QML. The window color
and flags
could probably be set in QML, but I opted to put all the code for winow transparency in one place like so:
QQuickView view;
QQuickWindow::setDefaultAlphaBuffer(true);
view.setColor(Qt::transparent);
view.setFlags(m_View.flags() |
static_cast(Qt::WA_TranslucentBackground));