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

background can not be set transparent on Lubuntu LXQT desktop

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.3
    • None
    • Linux/X11

    Description

      The same code shows transparent background on Lubuntu Gnome desktop, but no transparency on Lubuntu LXQT desktop.

      some discussions are here: Qt 6.6.2 has the same issue.

      https://forum.qt.io/topic/93408/transparent-widget/12?_=1713971048174

      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QWidget* tab_content = new QWidget();
          tab_content->setAttribute(Qt::WA_OpaquePaintEvent); //makes the widget transparent
      
          QTabWidget* tw = new QTabWidget();
          tw->addTab(tab_content, "Example");
          tw->setStyleSheet("QTabBar::tab { background: transparent; }"); //makes the header transparent
      
          QWidget w;
          w.setAttribute(Qt::WA_TranslucentBackground); //makes the window transparent
          w.setLayout(new QVBoxLayout());
          w.layout()->addWidget(tw);
          w.show();
      
          return a.exec();
      } 

      Attachments

        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
            joecfd Joe Joe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes