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. QOpenGLPaintDevice and alpha other than 255

QOpenGLPaintDevice and alpha other than 255

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 614 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.
  • E Offline
    E Offline
    Esperantisto
    wrote on last edited by
    #1

    If I render to an QOpenGLPaintDevice using the following code then everything looks fine:
    @QOpenGLPaintDevice device(size);
    QPainter painter(&device);

    painter.setPen(QPen(QColor(255, 0, 0, 255), 5));
    painter.setBrush(Qt::NoBrush);
    painter.drawEllipse(QRect(size.width() / 2 - 100, size.height() / 2 - 100, 200, 200));@

    Here's what it looks like:
    !http://m2.i.pbase.com/o9/09/605909/1/154046342.nGGAoY9D.Screenshot_01.png!

    If I change the alpha value of the color to anything other than 255 then here's what I get (128 used here):
    !http://m4.i.pbase.com/o9/09/605909/1/154046344.QoJtHhK0.Screenshot_02.png!

    Is this a limitation of QOpenGLPaintDevice or a bug?

    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