New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt 5.15.2 - Tab refresh problem with a QGLWidget #294
Comments
Is this also reproducible with Qt6? |
I was focused on upgrading to Qt5.15 before upgrading to Qt6 so i didn't test. |
QGLWidget as been removed in Qt6, and when I use a QOpenGLWidget it works. And i forgot to share the simple.pro: |
Hi, |
Sorry, I do not have any news. I do not use Qt 5.15 yet. Do you have created a bug report in the Qt bug tracker for this issue? |
As QGLWidget works with QDockWidgets and stop working properly when I use the Advance Docking System, I suppose they'll reject the bug and send me back here. Any idea when you're planing to migrate? You maybe have a clue for where to look in the meantime? We're not in the hurry but that might come ^^. Thanks |
According to your issue report, it worked in Qt 5.11.2 and it stopped working in Qt 5.15.2. So there must be a change or changes in the QGLWidget from 5.11.2 to 5.15.2. You could pull the Qt sources and look into the changes - maybe you find the change that causes the issue. You could also debug into ADS to see what is different in Qt 5.11.2 and 5.15.2. |
I'm reproducing this bug in both Qt 5.15.2 and Qt 6.1.0 (beta 3) using a Qt Data Visualization which is based on Q3DSurface, which has a QWindow in the bottom. I'm creating a widget to place inside an ADS tab with QWidget::createWindowContainer(&surface) |
I've done some more testing with different versions of Qt, here are my results
According to my tests the bug first appears in Qt 5.12.7 |
Hi Jonas, great job, that you traced this poblem down to this commit. I will try to find out if there is a way to fix this. |
I think the issue may be in Qt and not in ADS. I've left a bug report at https://bugreports.qt.io/browse/QTBUG-92979 However it may be possible to do some work-around for Qt >= 5.12.7 I don't know yet why this code causes problems, but it is in QWidget::event so it can probably be overloaded and handled differently, or filtered using installEventFilter. |
Yes, this was also my idea |
FWIW, I had this issue also. I played around a bit and the only way that I was able to resolve the issue was to override event in CDockAreaWidget like so: bool CDockAreaWidget::event(QEvent *e)
{
switch (e->type())
{
case QEvent::PlatformSurface:
{
return true;
}
break;
default:
break;
}
return QFrame::event(e);
} Overriding the event method in my OpenGL widget did not help for me. |
Thas sounds like a good solution that I could implement - thank you fot his hint. |
I can confirm cipperly's patch solves the issue for me too. Great work! |
Is this patch only required for Windows or for all platforms? |
I have only tested on Windows myself. I have no other operating systems available to test on. |
@cipperly I implemented you solution and just pushed it to master - so I hope this issue is fixed and I close it now. |
Hello ! |
Within the next 3 months. |
Hi,
First of all, thank you for your project, it's really great!
We use your advanced docking system in a big project and every thing worked find until we needed to upgrade to
Qt 5.15.2
(we were using Qt 5.11.2 before).Now, we have some widgets that shift as if there origin was the tab widget.
I managed to reduce the case, using the 'simple' exemple:
Just replace the original
MainWindow.cpp
andMainWindow.h
by the following onesMainWindow.zip
Thanks in advance
Best regards
The text was updated successfully, but these errors were encountered: