From Jean-Sebastien Guay and Martin Scheffler, "First are Martin's changes:

* Added support for floating windows and context menus in QMDIAreas.
* Protected the size (_width and _height) by a mutex to prevent threading problems.

Then my own:
* Made sure the embedded widget's size follows the graphicsView's size at all times so that window resizes will resize the widget as expected in fullscreen mode."
This commit is contained in:
Robert Osfield
2010-07-08 10:51:37 +00:00
parent d50bf88bc0
commit bc3578cf16
2 changed files with 84 additions and 32 deletions

View File

@@ -66,6 +66,7 @@ class OSGQT_EXPORT QGraphicsViewAdapter : public QObject
bool handlePointerEvent(int x, int y, int buttonMask);
bool handleKeyEvent(int key, bool keyDown);
QWidget* getWidgetAt(const QPoint& pos);
osg::observer_ptr<osg::Image> _image;
@@ -86,8 +87,10 @@ class OSGQT_EXPORT QGraphicsViewAdapter : public QObject
QColor _backgroundColor;
QPointer<QGraphicsView> _graphicsView;
QPointer<QGraphicsScene> _graphicsScene;
QPointer<QWidget> _widget;
OpenThreads::Mutex _qimagesMutex;
OpenThreads::Mutex _qresizeMutex;
int _previousFrameNumber;
bool _newImageAvailable;
unsigned int _currentRead;