[Interest] Styling tab background in QTabWidget

Muhammad Bashir Al-Noimi mbnoimi at gmail.com
Tue Sep 3 15:39:51 CEST 2013


> As you can see in this screenshot 
> <http://img692.imageshack.us/img692/3221/yexf.png> I styled QTabWidget 
> but I couldn’t set tab’s background to transparent although I used:
>
> QTabWidget#tabWidget_sidebar {
>     background-color: rgba(255, 255, 255, 0);
> }
>
>
> How can I fix this issue? 


Guys I'm really depressed of this issue, may I get some help from you? I 
read ton of pages and made many tests till arrived to dead end :(

I created a repository contains on demo application for testing 
QTabWidget stylesheet https://github.com/mbnoimi/test

I tried to use widget->setAttribute(Qt::WA_TranslucentBackground) as 
SGaist suggested but it didn't work!

I tried to use:
QStackedWidget <http://qt-project.org/doc/QStackedWidget.html> *stack = 
tabWidget->findChild<QStackedWidget 
<http://qt-project.org/doc/QStackedWidget.html> *>();
stack->setStyleSheet("background-color: rgba(255, 255, 255, 0)");
stack->setAttribute(Qt 
<http://qt-project.org/doc/Qt.html>::WA_TranslucentBackground);

it didn't work too!

-- 
Best Regards,
Muhammad Bashir Al-Noimi




More information about the Interest mailing list