[Interest] Styling tab background in QTabWidget

Muhammad Bashir Al-Noimi mbnoimi at gmail.com
Fri Aug 30 02:47:31 CEST 2013


      Howdy,

As you can see in this screenshot 
<http://img90.imageshack.us/img90/7582/6iyt.png> I styled QTabWidget but 
I couldn’t set tab’s background to transparent although I used:

 1.
    QTabWidget#tabWidget_sidebar {
 2.
      background-color: rgba(255, 255, 255, 0);
 3.
    }


How can I fix this issue?


--------


BTW, The complete QSS of QTabWidget is:

 1.
    QMainWindow#MainWindow {
 2.
      background-image: url(:/theme/bg.jpg);
 3.
    }
 4.
 5.
    QWidget#centralWidget {
 6.
      background-color: rgba(255, 255, 255, 0);
 7.
    }
 8.
    /**************** SIDE BAR ****************/
 9.
    QTabWidget#tabWidget_sidebar {
10.
      background-color: rgba(255, 255, 255, 0);
11.
    }
12.
13.
    QTabWidget#tabWidget_sidebar::tab-bar {
14.
      alignment: center;
15.
    }
16.
17.
    QTabWidget#tabWidget_sidebar::pane {
18.
      background-color: rgb(255, 255, 255, 0);
19.
    }
20.
21.
    QTabBar::tab {
22.
      background-color: rgb(0, 0, 0, 0);
23.
      padding: 2px;
24.
      border: 2px;
25.
      text-align: center;
26.
      height: 64px;
27.
      width: 64px;
28.
    }
29.
30.
    QTabBar::tab:selected {
31.
      background-color: rgba(255, 255, 255, 100);
32.
    }
33.
34.
    QTabBar::tab:hover {
35.
        background-color: rgba(255, 255, 255, 150);
36.
    }



-- 
Best Regards,
Muhammad Bashir Al-Noimi




More information about the Interest mailing list