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

Setting Qt::WA_TranslucentBackground gives black background

    XMLWordPrintable

Details

    Description

      Setting transparent using Qt::WA_TranslucentBackground  gives black background in windows. Below code gives transparency in linux but not in windows.

      MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
      
      \{
      
      setStyleSheet("background:transparent;");
      
      setAttribute(Qt::WA_TranslucentBackground);
      
      ui->setupUi(this);
      
      }
      

      Tested Windows version is Windows 10.

      Issue Frequency  : Always reproducable 

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            sujithbansuri sujith kv
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes