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

[macOS] Dialog shadow effect not working with macOS Tahoe

XMLWordPrintable

    • macOS

      Dialog with a shadow effect is not working with macOs Tahoe 26.0. The attached image shows the comparison with a working macOS version compared to Tahoe.

      The following code can be used to reproduce the issue:

      QDialog* dialog = new QDialog(this);
      dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::Window);
      dialog->setAttribute(Qt::WA_TranslucentBackground);
      
      QWidget* test = new QWidget(this);
      test->setFixedSize(400,300);
      
      QGraphicsDropShadowEffect* effect = new QGraphicsDropShadowEffect;
      const int blur = 38 * 3;
      effect->setBlurRadius(blur);
      effect->setXOffset(0);
      effect->setYOffset(24);
      effect->setColor(QColor(0, 0, 0, 75));
      test->setGraphicsEffect(effect);
      test->setContentsMargins(blur, blur, blur, blur);
      
      QVBoxLayout* layout = new QVBoxLayout;
      layout->addWidget(test);
      
      dialog->setLayout(layout);
      
      dialog->show(); 

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

            vestbo Tor Arne Vestbø
            tiheikka Titta Heikkala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes