[Development] Qt 5.2, Android and QWidget over OpenGL

Yves Bailly yves.bailly at laposte.net
Sat Oct 26 18:14:49 CEST 2013


Hello all,

I have a small application which use QGraphicsProxyWidget to display QWidget-based
controls over an instance of QGLWidget, defined as the viewport of a QGraphicsView.
A subclassed QGraphicsScene overrides the drawBackground() method to render the
OpenGL scene.

This works quite well on the desktop. I wanted to give it a try using the latest
beta of Qt 5.2.0 (build 2013-10-24_17-14-50-112). However it doesn't work at all,
it crashes with a message:
W/Qt      ( 9384): kernel/qplatformwindow.cpp:261 (virtual void QPlatformWindow::setParent(const QPlatformWindow*)): 
This plugin does not support setParent!
F/libc    ( 9384): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1), thread 9540 (mple.test_qt520)

The test is build on KUbuntu 13.10 64bits and run on a real device.

When trying the same with Qt 5.1.1, at least the program starts and shows the OpenGL
scene - but the widgets are not rendered correctly.

Fiddling around I found this basic program doesn't work on Android:
int main(int argc, char *argv[])
{
   QApplication a(argc, argv);
   QGLWidget glw;
   glw.show();
   return a.exec();
}
It crashes almost immediately, the last messages I get are:
V/SurfaceView(18383): Layout: x=0 y=25 w=320 h=455, frame=Rect(0, 0 - 320, 455)
I/Choreographer(18383): Skipped 42 frames!  The application may be doing too much work on its main thread.
D/dalvikvm(18383): threadid=11: interp stack at 0x536f6000
D/dalvikvm(18383): threadid=11: bye!
D/dalvikvm(18383): threadid=11: interp stack at 0x536f6000
D/dalvikvm(18383): threadid=11: bye!
F/libc    (18383): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1), thread 18446 (le.test_qt520_w)

Tweaking the QGLFormat or the Android target SDK don't help at all.

Is this a known problem? Or is QGLWidget basically no longer usable on Android?

Thanks for any hint.

-- 
(o< | Yves Bailly                          | -o)
//\ | Linux Dijon  : http://www.coagul.org | //\
\_/ |                                      | \_/`



More information about the Development mailing list