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. QGraphicsPolygonItem Opacity
Forum Updated to NodeBB v4.3 + New Features

QGraphicsPolygonItem Opacity

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • K Offline
    K Offline
    kamui
    wrote on last edited by kamui
    #1

    Hi everybody,

    I would like to know if there were any changes in the opacity behavior between Qt4 and Qt5.

    I didn't handle the migration so not sure if it is related to Qt or the app's code but here is the problem :

    It seems that on previous releases (running on Qt4.8), the behavior was the following (reproduced by substracting polygons at intersection)

    0_1500888976971_non-cumulative-opacity.jpg

    now (Qt 5.5.1), the behavior is more realistic, but not what the users want (users are professors that need to mark several times the same word, wihtout hiding it for example)

    0_1500888980282_cumulative-opacity.jpg

    my question is : is this change related to an evolution of Qt in opacity handling ? If not, I know I have to search for any related change in the hundreds of commits between the two releases so ... please tell me this is due to a Qt evol :)

    Thanks a lot !

    raven-worxR 1 Reply Last reply
    0
    • K kamui

      Hi everybody,

      I would like to know if there were any changes in the opacity behavior between Qt4 and Qt5.

      I didn't handle the migration so not sure if it is related to Qt or the app's code but here is the problem :

      It seems that on previous releases (running on Qt4.8), the behavior was the following (reproduced by substracting polygons at intersection)

      0_1500888976971_non-cumulative-opacity.jpg

      now (Qt 5.5.1), the behavior is more realistic, but not what the users want (users are professors that need to mark several times the same word, wihtout hiding it for example)

      0_1500888980282_cumulative-opacity.jpg

      my question is : is this change related to an evolution of Qt in opacity handling ? If not, I know I have to search for any related change in the hundreds of commits between the two releases so ... please tell me this is due to a Qt evol :)

      Thanks a lot !

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

      @kamui said in QGraphicsPolygonItem Opacity:

      I didn't handle the migration so not sure if it is related to Qt or the app's code but here is the problem

      then it's even harder to say.
      I am not aware of such regression.
      But it seems that in the first screenshot the paths are combined, where in the second one they are 2 different shapes painted over each other.

      --- 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
      1
      • K Offline
        K Offline
        kamui
        wrote on last edited by kamui
        #3

        The point is that in the first screenshot (the previous behavior, wanted by users), a semi-transparent path overlapping another semi-transparent path resulted on an intersected area with the same semi-transparency (say 0.5).

        Now, the intersected area is less transparent, as it is the combination of the two semi-opaque polygons (so transparency value is now 0.25).. what I want to figure out is "is this change related to Qt4->Qt5 migration of the app or not ?". I guess I will not escape from a minimal code in both Qt versions...

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kamui
          wrote on last edited by kamui
          #4

          the difference is due to a modification of the Composition Mode of the QPaineter wich was painting the objects (QPainter::QCompositionMode_Darken on the first screenshot and QPainter::QCompositionMode_SourceOver on the second one)

          So not an evolution of Qt painting behavior, but a modification of the app's code.

          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