diff options
Diffstat (limited to 'examples/opengl/hellogl2/main.cpp')
-rw-r--r-- | examples/opengl/hellogl2/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/opengl/hellogl2/main.cpp b/examples/opengl/hellogl2/main.cpp index 4dc67f6e15..554e37e19b 100644 --- a/examples/opengl/hellogl2/main.cpp +++ b/examples/opengl/hellogl2/main.cpp @@ -59,6 +59,10 @@ int main(int argc, char *argv[]) QSurfaceFormat::setDefaultFormat(fmt); MainWindow mainWindow; + if (QCoreApplication::arguments().contains(QStringLiteral("--transparent"))) { + mainWindow.setAttribute(Qt::WA_TranslucentBackground); + mainWindow.setAttribute(Qt::WA_NoSystemBackground, false); + } mainWindow.resize(mainWindow.sizeHint()); int desktopArea = QApplication::desktop()->width() * QApplication::desktop()->height(); |