Styling tab background in QTabWidget
-
[quote]Is your QTabWidget contained in another widget ?[/quote]
It contained in MainWindow directly.[quote]And what do you expect to see through it (i.e. desktop, other program window etc…) ?[/quote]
As shown in the screenshot I expect to see transparent tab (see the wood instead of gray color) -
Then try this:
@
QStackedWidget *stack = tabWidget->findChild<QStackedWidget *>();
stack->setStyleSheet("background-color: rgba(255, 255, 255, 0)");
@ -
It make all tabs appears white instead of transparent!
-
BTW, I tried to use this but I got same result (white tabs's background)!
[code]stack->setStyleSheet("background-color: rgba(0, 0, 0, 0)");[/code]
-
add
@stack->setAttribute(Qt::WA_TranslucentBackground);@
-
[quote author="SGaist" date="1378068949"]add
@stack->setAttribute(Qt::WA_TranslucentBackground);@[/quote]
Didn't fix the issue :(
-
I created a repository contains on demo application for testing QTabWidget stylesheet and I added you as a moderator: https://github.com/mbnoimi/test
May you please see what's going on?
-
Your example is missing the stylesheet/background/icons to reproduce what you show in your first post.
-
[quote author="SGaist" date="1378155444"]Your example is missing the stylesheet/background/icons to reproduce what you show in your first post.[/quote]
It doesn't missing anything. I created very simple project so may you please run the project to test your suggestions.
-
If you'd like me to test anything related to your widget styling problem, I'll need a complete example with the style sheet your are using and the necessary elements for it (i.e. the background / icons)
-
[quote author="SGaist" date="1378157197"]If you'd like me to test anything related to your widget styling problem, I'll need a complete example with the style sheet your are using and the necessary elements for it (i.e. the background / icons)[/quote]
OK; I updated a new version with resources (modified the screenshot)
-
-
Then... The first question that should have been asked: What version of Qt/OS are you using ?
-
[quote author="SGaist" date="1378217522"]Then... The first question that should have been asked: What version of Qt/OS are you using ?[/quote]
Qt 5.1.1
Mint KDE 15 + Windows 7 -
I have tested it on Windows and can confirm that it's not working on it (though it does on OS X)
Did you check the "bug report system":https://bugreports.qt-project.org/ to see if this is something known ? You might consider creating a bug report (put as much details as you can and a minimal compilable example so it can be reproduced)
-
Oops it seems a real bug!!!
Thanks you for help I'll file a bug report about it.
-