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. QGraphicsOpacityEffect::setOpacityMask(const QBrush & mask): black not 100% transparent and transparent not 100% opaque.

QGraphicsOpacityEffect::setOpacityMask(const QBrush & mask): black not 100% transparent and transparent not 100% opaque.

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 4.5k 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.
  • U Offline
    U Offline
    ucomesdag
    wrote on last edited by
    #1

    Got an issue with QGraphicsOpacityEffect::setOpacityMask(const QBrush & mask) the mask is a pixmap set with QBrush::(const QPixmap & pixmap) it contains a gradient Qt::black to Qt::transparent. On windows the black part is transparent and the transparent part is opaque with the mask applied, as it should be.

    On Ubuntu Lucid and also with maemo with the latest qtsdk-2010.04 and latest NokiaSDK black is not 100% transparent and transparent is not 100% opaque. It seems to be the default opacity value (0.7) that gets applied to the mask it self. I tried to fix it with setting opacity to (1.0) before and after setting the mask. Result is that the black area is as it should 100% transparent, but the transparent area is totally black with the mask applied.

    @QGraphicsOpacityEffect *effect_opacity = new QGraphicsOpacityEffect;
    effect_opacity->setOpacityMask(QBrush(opacity_mask));
    //effect_opacity->setOpacity(1.0);@

    Question am I doing something totally wrong and missed something, somehow, somewhere? Or is this a bug/feature? ;-)

    Write “Qt”, not “QT” (QuickTime).

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      [quote author="ucomesdag" date="1282779969"]black is not 100% transparent and transparent is not 100% opaque.[/quote]

      Whut? I'm probably missing out on some detail here, but why would you want something that you define to be transparent (see-through) to end up opaque (not very see-through)?

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • U Offline
        U Offline
        ucomesdag
        wrote on last edited by
        #3

        [quote author="Franzk" date="1282801390"][quote author="ucomesdag" date="1282779969"]black is not 100% transparent and transparent is not 100% opaque.[/quote]

        Whut? I'm probably missing out on some detail here, but why would you want something that you define to be transparent (see-through) to end up opaque (not very see-through)?

        [/quote]

        Dude I'm talking about the opacity mask. A black mask applies the effect and a transparent mask lets the image as is. So with an opcity mask, black will make the image transparent and transparent will leave the image as is, opaque as in not transparent. :-)

        Write “Qt”, not “QT” (QuickTime).

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #4

          Ah :) I knew I was missing something.

          "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • U Offline
            U Offline
            ucomesdag
            wrote on last edited by
            #5

            [quote author="Franzk" date="1282828283"]Ah :) I knew I was missing something.[/quote]

            Lol

            Write “Qt”, not “QT” (QuickTime).

            1 Reply Last reply
            0
            • U Offline
              U Offline
              ucomesdag
              wrote on last edited by
              #6

              Reported it as a bug: http://bugreports.qt.nokia.com/browse/QTSDK-176

              Write “Qt”, not “QT” (QuickTime).

              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