Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7112

Applying QGraphicsBlurEffect to widgets embedded in QGraphicsView makes it disappear

    XMLWordPrintable

Details

    Description

      When creating a QPushButton and placing it in a QGraphicsScene, then applying a QGraphicsBlurEffect to the button, the button disappears as soon as the blurRadius != 0.

      QPushButton *blurButton = new QPushButton("Blur");
      QGraphicsProxyWidget *blurItem = scene->addWidget(blurButton);
      blurItem->setPos(blurButton>width()/2, 10-blurButton>height());
      QGraphicsBlurEffect *blurEffect = new QGraphicsBlurEffect(this);
      blurEffect->setBlurRadius(0);
      blurButton->setGraphicsEffect(blurEffect);

      However, changing the graphics effect to apply to the QGraphicsProxyWidget fixes the problem:

      blurItem->setGraphicsEffect(blurEffect);

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            e8johan Johan Thelin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes