Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is it possible to use several paint engine in application?
QtWS25 Last Chance

Is it possible to use several paint engine in application?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 3.7k Views
  • 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 Offline
    M Offline
    mykhailo
    wrote on last edited by
    #1

    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
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

      Do you try do this?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dangelog
        wrote on last edited by
        #3

        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
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mykhailo
            wrote on last edited by
            #5

            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
            0
            • L Offline
              L Offline
              lgeyer
              wrote on last edited by
              #6

              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
              0
              • M Offline
                M Offline
                mykhailo
                wrote on last edited by
                #7

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

                • Login

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