Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickWindow rendering in background
QtWS25 Last Chance

QQuickWindow rendering in background

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlrenderingqquickwindowmacosxwindows
5 Posts 2 Posters 2.4k 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
    Mikhail Kurnosov
    wrote on 28 Apr 2016, 11:22 last edited by Mikhail Kurnosov
    #1

    I need constantly render my own graphics in QQuickWindow. I have a component inherited from QItem to do this. The rendering is performing when I catch a signal from the QQuickWindow.

            connect(win, SIGNAL(beforeRendering()), this, SLOT(paint()), Qt::DirectConnection);
    

    When the window is visible and is not minimized then all is Ok. But when the window is in the background or minimized the signal beforeRendering() is not emitted, so I can't render my graphics.
    This problem is actual only in Windows and MacOS. In ubuntu the rendering in backgound is Ok too.
    How can I resolve this issue?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on 28 Apr 2016, 13:12 last edited by
      #2

      Hi, and welcome to the Qt forum!
      The issue is actually that Ubuntu still renders the content even when the window is not visible. That's a waste of GPU ressources.

      M 1 Reply Last reply 28 Apr 2016, 13:52
      0
      • ? A Former User
        28 Apr 2016, 13:12

        Hi, and welcome to the Qt forum!
        The issue is actually that Ubuntu still renders the content even when the window is not visible. That's a waste of GPU ressources.

        M Offline
        M Offline
        Mikhail Kurnosov
        wrote on 28 Apr 2016, 13:52 last edited by Mikhail Kurnosov
        #3

        @Wieland
        Thanks for your answer. I realize that. But is it possible to enable emitting signal beforeRendering() from QQuickWindow in background? Because it is the shortest way to my purposes.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on 28 Apr 2016, 14:21 last edited by A Former User
          #4

          I'm pretty sure there is no ootb solution to do that. Why do you want to render the background when it's not possible? Maybe we can find another solution.

          M 1 Reply Last reply 29 Apr 2016, 05:43
          0
          • ? A Former User
            28 Apr 2016, 14:21

            I'm pretty sure there is no ootb solution to do that. Why do you want to render the background when it's not possible? Maybe we can find another solution.

            M Offline
            M Offline
            Mikhail Kurnosov
            wrote on 29 Apr 2016, 05:43 last edited by
            #5

            @Wieland said:

            I'm pretty sure there is no ootb solution to do that. Why do you want to render the background when it's not possible? Maybe we can find another solution.

            This is because I have a real-time video streaming and the frames are rendering in main QQuickWindow context. I think otherwise I need to create another opengl context and run rendering in it. Or maybe there is some way to use the same QQuickWindow context to do that?

            1 Reply Last reply
            0

            3/5

            28 Apr 2016, 13:52

            • Login

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