Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

iOS hardware acceleration for child widget of QGraphicsView



  • Hello!

    I have a few draggable dialogue-ish popup-widgets that render slowly on iOS, for example calling QWidget::move() on them in response to mouse movements for dragging. How can I get these widgets to render with hardware acceleration on iOS? I am using QOpenGLWidget for the QGraphicsView's viewport, but how to I accelerate these child QWidgets of that QGraphicsView? Should I set an intermediate parent for the QGraphicsView itself that is a QOpenGLWidget? Or something like that?

    Thank you!

    -Patrick


  • Lifetime Qt Champion

    Hi,

    There's no hardware acceleration for QWidget as it uses the raster engine. The platform itself doesn't play any role there.



  • @SGaist Any suggestion how to get these widgets to perform faster? I have noticed all the widgets - list+table views for example, are slow.


  • Lifetime Qt Champion

    What kind of widget are you using ?
    For what purpose ?



  • @SGaist In the attached screenshot you will see a parent QGraphicsView with a QGraphicsScene shown. It has a date label, two toolbars, and a pop-up properties dialog all implemented using QWidget.

    The problem is that the performance of the QWidgets on iOS, including dragging of the pop-up dialogs and property animations for the toolbars and other widgets is not hardware accelerated. The frame rate is really slow.

    I tried sticking a QOpenGLWidget as a proxy parent for the QGraphicsView, but not luck. The QGraphicsView viewport performance is already fairly good with a QOpenGLWidget for it.

    0_1518668462425_2018-02-14_20-13-13.jpg


  • Lifetime Qt Champion

    @patrickkidd You could consider QML/QtQuick for your UI as it uses hardware acceleration.



  • @jsulm is that the intended route? Is it the only way to do it? I already have this app in beta as is on OS X, was hoping to port it to iOS. Though the QWidget versions definitely don’t look good on iOS so I would have to do some ui tweaking either way.



  • If I replace the property sheet shown with a QtQuick form embedded in the QWidget, will the QtQuick form be hardware accelerated?


Log in to reply