Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Widgets in QGLWidget

Widgets in QGLWidget

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    ltr6
    wrote on last edited by
    #1

    In http://qt-project.org/wiki/Qt_for_Android_known_issues it is stated that:

    bq. Only one OpenGL window is supported. This also means that there can only be one QtQuick Window element. When using QtWidgets, only the first window created will support OpenGL. (Multiple dialogs are supported, but they will use the raster paint engine.)

    I would like to get some clarification on this. Does it mean that you should now be able to draw multiple widgets inside of a QGLWidget with the raster paint engine on Android?

    On Qt 5.1.1 it was possbile to draw widgets on top of OpenGL, though they would always default to full screen, but you could then draw widgets of any size inside of that widget. I only got it working on an Acer A100, on other devices it resulted in the widget flickering or other weird behavior. I was hoping this would be fixed in Qt 5.2.

    With Qt 5.2 I haven't been able to draw any widgets on top of OpenGL, except for QMessageBox, which works for some reason. Trying to draw a QFileDialog in the hellogl_es2 example, results in errors like this:

    W/Qt (10757): painting\qpainter.cpp:3932 (const QPen& QPainter::pen() const): QPainter::pen: Painter not active
    W/Qt (10757): painting\qpainter.cpp:3875 (void QPainter::setPen(const QPen&)): QPainter::setPen: Painter not active
    W/Qt (10757): painting\qpainter.cpp:3875 (void QPainter::setPen(const QPen&)): QPainter::setPen: Painter not active
    W/Qt (10757): kernel\qwidget_qpa.cpp:998 (virtual QPaintEngine* QWidget::paintEngine() const): QWidget::paintEngine: Should no longer be called
    W/Qt (10757): painting\qpainter.cpp:1734 (bool QPainter::begin(QPaintDevice*)): QPainter::begin: Paint device returned engine == 0, type: 1
    W/Qt (10757): painting\qpainter.cpp:4009 (const QBrush& QPainter::brush() const): QPainter::brush: Painter not active
    W/Qt (10757): painting\qpainter.cpp:3932 (const QPen& QPainter::pen() const): QPainter::pen: Painter not active
    W/Qt (10757): painting\qpainter.cpp:1569 (void QPainter::save()): QPainter::save: Painter not active
    W/Qt (10757): painting\qpainter.cpp:2774 (void QPainter::setClipRect(const QRect&, Qt::ClipOperation)): QPainter::setClipRect: Painter not active

    The widget itself is clickable, but not visible.

    Have I interpreted the post in the Android known issues all wrong, or is there some way to enable painting widgets on a QGLWidget?

    Thanks.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved