diff --git a/qglengine/glwidget.cpp b/qglengine/glwidget.cpp index 980757f..6cb8d82 100644 --- a/qglengine/glwidget.cpp +++ b/qglengine/glwidget.cpp @@ -5,7 +5,7 @@ GLWidget::GLWidget(QWidget *parent) : QWidget(parent) { view_ = new QGLView(); - view_->setFlag(Qt::FramelessWindowHint); + view_->setFlags(windowFlags() | Qt::FramelessWindowHint); container = QWidget::createWindowContainer(view_, this); lay = new QVBoxLayout(this); lay->addWidget(container); diff --git a/qglengine/openglwindow.cpp b/qglengine/openglwindow.cpp index f6fa56c..3768a84 100644 --- a/qglengine/openglwindow.cpp +++ b/qglengine/openglwindow.cpp @@ -10,7 +10,7 @@ OpenGLWindow::OpenGLWindow(QWindow *parent) , m_context(nullptr) , m_device(nullptr) { - setFlag(Qt::FramelessWindowHint); + setFlags(flags() | Qt::FramelessWindowHint); setSurfaceType(QWindow::OpenGLSurface); QSurfaceFormat format = QSurfaceFormat::defaultFormat(); // qDebug() << format;