[Solved] Qt integration bug on Windows 7

classic Classic list List threaded Threaded
5 messages Options
Nikkitta Nikkitta
Reply | Threaded
Open this post in threaded view
|

[Solved] Qt integration bug on Windows 7

This post was updated on .
Hi,

I use this approach to integrate osgEarth into Qt window:
m_viewerWidget = new osgEarth::QtGui::ViewerWidget(m_compositeViewer);
On my system, Windows 10, everything works great.

But on Windows 7 there is a strange behaviour:
1. My Qt window is not fullscreen


2. Then I do it full screen and part of the new view is occupied with the same size "screenshot" as on previous view. This part is also freezed and it covers the new view.


If I do something like Alt+TAB, or just open the Start menu the widget with osgEarth is updated and everything starts to work normal. But I'd like to solve this problem completely.

Any ideas?
Best regards,
Nikita Petrov
Nikkitta Nikkitta
Reply | Threaded
Open this post in threaded view
|

Re: Qt integration bug on Windows 7

I've checked once again on a simple example - osgearth_qt_simple.exe - behaviour is the same on Windows 7.
It looks like QWidget (or what is inside osgEarth::QtGui::ViewerWidget) is not cleared or updated fully after resize.

I guess lots of people use osgEath integrated in Qt window, so please tell me how do you correctly do it?
Best regards,
Nikita Petrov
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Qt integration bug on Windows 7

Nikkitta,

Sorry but I no longer have a Win 7 machine to test. Perhaps you can search for a way to force a repaint on the Qt widget after the resize?
Glenn Waldron / Pelican Mapping
Nikkitta Nikkitta
Reply | Threaded
Open this post in threaded view
|

Re: Qt integration bug on Windows 7

In reply to this post by Nikkitta
I've managed to find a solution for this problem.
Previously I used frame scheme ON_DEMAND for composite viewer.
So now I just changed it to CONTINUOUS and it works perfectly on Windows 7:
 m_compositeViewer->setRunFrameScheme(osgViewer::ViewerBase::CONTINUOUS);

Hope that it will help someone.
Best regards,
Nikita Petrov
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Qt integration bug on Windows 7

Glad you figured this out. Why this would work in Win10 and not Win7 is a mystery. But surely the resize event is not propagating to the viewer to signal the need for a redraw for some reason.
Glenn Waldron / Pelican Mapping