Help save net neutrality! Learn more.

#202 QGraphicsScene+QGLWidget problem

steve pike

For a client I am porting their Qt based software to Android, for use on Samsung Galaxy smartphones. Currently the system uses a QGraphicsScene and QGraphicsView that is accelerated using a QGLWidget as the viewport, which works fine under Ubuntu. Software is written in 100% C++, no QML.

Porting this using Necessitas is a pretty smooth operation and everything works perfectly, as long as I don't use a QGLWidget as the viewport. When I do use GL acceleration, it seems that embedded widgets created using addWidget() are resized to full screen within the QGraphicsView, resulting in one widget, for example a label, dominating the screen, the rest being invisible.

Temporarily uncommenting the code for this widget will result in another GUI element appearing full screen. Getting the dimensions from the widget and printing them to debugging output reveals that they are indeed resized to screen dimensions and I cannot override this using setGeometry.


Log in to post a comment.