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

QGraphicsOpacityEffect screenshot problem

Scheduled Pinned Locked Moved General and Desktop
qgraphicsopacitscreenshot
1 Posts 1 Posters 760 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.
  • A Offline
    A Offline
    apic
    wrote on last edited by
    #1

    Good Morning everybody,
    I have a QLabel with image animated with a QGraphicsOpacityEffect and QPropertyAnimator
    to perform an image switching with fade out/in effect; everything is inside a QWidget that is than added
    to a container widget.
    Now, i make screenshots of parent widget with:

    QImage bitmap(rect.size(), QImage::Format_ARGB32);
    bitmap.fill(Qt::transparent);
    QPainter painter(&bitmap);
    widget->render(&painter, QPoint(), rect, QWidget::DrawChildren);
    painter.end();

    since i need to save an image with alpha channel of screen.

    The widget with QGraphicsOpacityEffect is never shown in screenshots and the area of the widget always result in fully transparent rectangle.
    Futhermore if i use grabWidget sometimes i see the widget but most of the times not and when visible
    it is always in wrong position with respect to screen. It seems to depend upon the effect because if disabled everything is perfectly rendered

    Maybe i'm missing something.

    Any help would be much appreciated.

    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