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. "Rendering" QGraphicsDropShadowEffect in another thread ?
Forum Updated to NodeBB v4.3 + New Features

"Rendering" QGraphicsDropShadowEffect in another thread ?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.6k Views 1 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.
  • R Offline
    R Offline
    remmos
    wrote on last edited by
    #1

    Hey, is it possible getting a QGraphicsDropShadowEffect "rendered" in another thread than e.g. QGraphicsWidget?

    I have a QGraphicsWidget (within a "container" QGraphicsWidget with QGraphicsLinearLayout) streched 100% of the view's width, but when I resize the view (and therefore also the "container's" gemoetry => also the main QGraphicsWidget's geometry which the effect is enabled on) it takes a lot of time and it looks a bit "shaky"

    But I have absolutely no idea how I should do it with the two threads ...

    Hope someones have an idea =)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      All GUI elements have to be handled solely the main thread. It's a hard and fast rule.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        remmos
        wrote on last edited by
        #3

        So I'll always have this kind of delay when I resize the window?

        Is it possible to disable the effect when I begin resizing the window and reactivate the effect when the resizing is done? (Is there a event-handler for this?)

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

          The sad truth is that the whole graphics effects stuff is simply broken in Qt4. You need OpenGL and shaders to properly do a drop shadow in real time. Try to cheat as much as you can, for instance replace the effect with some kind of semi-transparent image while you're resizing, then set the effect back.

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

          1 Reply Last reply
          0
          • R Offline
            R Offline
            remmos
            wrote on last edited by
            #5

            Is there any tutorial for a drop-shadow with OpenGL and shaders?

            (I've never done some opengl stuff :D)

            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