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

[Carbon] Setting a (transparent) pixmap in a brush of a palette for the QWidget::backgroundRole() of a Top level QWidget does not work - empty transparent window.

XMLWordPrintable

    • macOS

      When settings a pixmap that contains transparency in the background role of a top level QWidget, the window become totally transparent instead of showing the pixmap.
      The problem appear only with Carbon, on Cocoa the pixmap is correctly shown.

      Exemple of used code :

      void Dock::on_lwImages_itemActivated( QListWidgetItem* item )
      {
      	const QPixmap pixmap( item->data( Qt::UserRole ).toString() );
      	QPalette palette = QApplication::palette();
      	
      	palette.setBrush( widget->backgroundRole(), QBrush( pixmap ) );
      	widget->setPalette( palette );
      	widget->resize( pixmap.size() );
      }
      

        1. transparency-carbon.zip
          22 kB
          Filipe Azevedo
        2. transparency.zip
          21 kB
          Filipe Azevedo
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            pasnox Filipe Azevedo
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes