From 83b37c5be6f453d8d5165302c079353cb27a7979 Mon Sep 17 00:00:00 2001 From: Thibault GEFFROY Date: Tue, 18 Mar 2025 10:53:32 +0100 Subject: [PATCH] Avoid window blink when handling OpenGL --- src/DockAreaWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index bd554ff..df693f5 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -725,6 +725,8 @@ void CDockAreaWidget::setCurrentIndex(int index) Q_EMIT currentChanging(index); TabBar->setCurrentIndex(index); d->ContentsLayout->setCurrentIndex(index); + // Force the widget to be native in order to avoid blinks with OpenGL widgets + d->ContentsLayout->currentWidget()->winId(); d->ContentsLayout->currentWidget()->show(); // Force the repaint of the current widget because mix of OpenGL widgets // and Raster widgets could have not been entirely rendered