QTabWidget moving tab bug using stylesheet
Hi,
I'm using a QTabWidget and I have the stylesheet loaded and set using "App.setStyleSheet".
When I move the tab on a movable QTabWidget, the text and border is not visible anymore, this is like a rectangle of color, only the close button is visible.
That only happen if I set the background-color in QWidget of the stylesheet like that :
Code:
{
background-color: #302F2F;
}
If I don't set the background-color the moving tab looks the same as before moving.
Is it a bug of Qt or something I miss ?
Thanks for the help
Re: QTabWidget moving tab bug using stylesheet
Minimal code to reproduce the bug (move tab1 or tab2 and you will see the tab becomes gray) :
Code:
#include <QApplication>
#include <QMainWindow>
#include <QTabWidget>
int main(int argc, char *argv[])
{
a.setStyleSheet("QWidget{background-color: #302F2F;}");
TabWidget
->addTab
(new QWidget(TabWidget
),
"Tab1");
TabWidget
->addTab
(new QWidget(TabWidget
),
"Tab2");
MainWindow.setCentralWidget(TabWidget);
TabWidget->setMovable(true);
MainWindow.show();
return a.exec();
}
Link of the QTBUG : https://bugreports.qt.io/browse/QTBUG-45173