Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Is it possible to use several paint engine in application?

    General and Desktop
    4
    7
    3428
    Loading More Posts
    • 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.
    • M
      mykhailo last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • Q
        qxoz last edited by

        Do you try do this?

        1 Reply Last reply Reply Quote 0
        • D
          dangelog last edited by

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

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply Reply Quote 0
          • L
            lgeyer last edited by

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

            1 Reply Last reply Reply Quote 0
            • M
              mykhailo last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • L
                lgeyer last edited by

                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);
                }
                @

                1 Reply Last reply Reply Quote 0
                • M
                  mykhailo last edited by

                  [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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post