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

Details

    • macOS

    Description

      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() );
      }
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes