Is it possible to use several paint engine in application?



  • Hi,

    Is it possible to use several paint engine in application?

    I need for example render some widget using "native" paint engine and some widgets using "raster" engine.



  • Do you try do this?



  • Unfortunately I don't think so. You need to modify Qt and provide a way to change the paintEngine() for a QWidget.



  • Let's get one step back: what's the reason you are trying to use two different paint engines?



  • bq. Do you try do this?

    Yes I think that is possible paintEngine() but I am not sure that is right way.

    bq. Let’s get one step back: what’s the reason you are trying to use two different paint engines?

    I have problems with rendering QML on MacOS.

    1. Native paint engine works good for simple widgets and support transparency. (but have problems with complicated widgets)

    2. Raster paint engine works good for all widgets but have problem with transparency.

    So I think that it may be possible to use native engine for simple widgets (to save transparency) and use raster engine for more complicated widgets.



  • Have you tried using the OpenGL engine or setting an OpenGL viewport?
    @
    int main(int argc, char *argv[])
    {
    QApplication::setGraphicsSystem("opengl");
    QApplication application(argc, argv);
    ...
    QDeclarativeView view;
    view.setViewport(new QGLWidget);
    }
    @



  • [quote author="Lukas Geyer" date="1322482667"]Have you tried using the OpenGL engine or setting an OpenGL viewport?
    @
    int main(int argc, char *argv[])
    {
    QApplication::setGraphicsSystem("opengl");
    QApplication application(argc, argv);
    ...
    QDeclarativeView view;
    view.setViewport(new QGLWidget);
    }
    @[/quote]
    thanks. Yes I have tried opengl as graphic system but it doesn't support transparency.

    Now I use mix with native paint engine and opengl paint engine (using viewport). I hope it will work stable.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.