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. QT and QT Quick graphic Backend
Forum Updated to NodeBB v4.3 + New Features

QT and QT Quick graphic Backend

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 3 Posters 2.5k Views 3 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.
  • AlienA Offline
    AlienA Offline
    Alien
    wrote on last edited by
    #1

    Hey,
    I know that Qt can configure with a lot of graphic backends but I suspicious that which kind of QT API actually use graphic backend, of course QT 3D API such as (QOpenGLWidget,...) use graphic backend but how about Qpainter and other which one use real hardware accelerate and which one doesn't use?

    Best Regards,

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The backends are platform specific e.g. the xcb backend run on Unix like OSes but not on Windows but it provides integration with hardware acceleration trough the Xorg server.

      QPainter uses by default the raster engine but again the application uses xcb as the backend.

      You have more alternatives here.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • AlienA Offline
        AlienA Offline
        Alien
        wrote on last edited by
        #3

        @SGaist thanks for your reply,might be I could not explain the problem clearly I know that Qt uses graphic backends such as xcb,eglfs,... thing that i doubt is that I don't know does QPainter use opengl when eglfs selected as a graphic backend or not? in the other words does Qpainter use hardware acceleration or not(when eglfs selected)?

        raven-worxR 1 Reply Last reply
        0
        • AlienA Alien

          @SGaist thanks for your reply,might be I could not explain the problem clearly I know that Qt uses graphic backends such as xcb,eglfs,... thing that i doubt is that I don't know does QPainter use opengl when eglfs selected as a graphic backend or not? in the other words does Qpainter use hardware acceleration or not(when eglfs selected)?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @Alien said in QT and QT Quick graphic Backend:

          in the other words does Qpainter use hardware acceleration or not(when eglfs selected)?

          no - not directly

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          2
          • AlienA Offline
            AlienA Offline
            Alien
            wrote on last edited by
            #5

            @raven-worx what should I do in this case?

            Imagine I want to create custom QML component if I inherit from QQuickPaintedItem and override "paint" method and use Qpainter I can't get benefit of hardware accelerate,right?In this case what do you suggest me?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Did you try to build changing RenderTarget ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              AlienA 1 Reply Last reply
              0
              • SGaistS SGaist

                Did you try to build changing RenderTarget ?

                AlienA Offline
                AlienA Offline
                Alien
                wrote on last edited by
                #7

                @SGaist could you please get snippet code for that ?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Do you mean a constructor that calls setRenderTarget ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  AlienA 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Do you mean a constructor that calls setRenderTarget ?

                    AlienA Offline
                    AlienA Offline
                    Alien
                    wrote on last edited by
                    #9

                    Dear @SGaist ,
                    as https://conf.qtcon.org/system/attachments/137/original/writing-custom-qtquickcomponents-QtCon.pdf%3F1473164662 explain on page 16 subclass from QQuickPaintedItem and using Qpainter is slow approach but subclass from QQuickItem is fast (H.W accelerate) approach also you can subclass from QQuickFrameBufferObject(H.W accelerate). Qpainter API is a kind of convenience and easy API but as I said it's either kind of slow API.

                    I just want to know if my understanding is right and Qpainter is slow API for drawing?

                    I really appreciate your help.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Yes, QPainter is usually slower because it uses the raster engine.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • AlienA Offline
                        AlienA Offline
                        Alien
                        wrote on last edited by
                        #11

                        Thank you so much for your help
                        Best Regards,

                        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