Re: [osg-users] osgQt aspect ratio issue when inside QMainWindow

2020-02-25 Thread OpenSceneGraph Users
Hi Mohamed, thank you for your reply. Actually, the methods initializeGL, resizeGL and paintGL are not virtual and are already implemented inside the osgQOpenGLWidget class. Probably there's some function inside these methods that is called only once, probably at window initialization, or that i

Re: [osg-users] osgQt aspect ratio issue when inside QMainWindow

2020-02-24 Thread OpenSceneGraph Users
Hi Angelo, I believe you should handle from the osgQOpenGLWidget virtual methods, which should be something like virtual void resizeGL( int width, int height ); As it's expected it should be called whenever there's a change in the widget size. From there you would be able to call osgViewer::G

[osg-users] osgQt aspect ratio issue when inside QMainWindow

2020-02-20 Thread OpenSceneGraph Users
Hi, I am trying to put an osgQOpenGLWidget inside a QMainWindow. I managed to made it quite easily but the resulting image is stretched and I cannot change its aspect ratio to made it right (the cow.osg is really stretched). Can you help me, please? I have been struggling with this few lines of c