Created attachment 184171 [details] Screenshot of the reproducer showing grayish artifacts between unselected tabs SUMMARY Hi Breeze-Crew! When using a QTabWidget in vertical orientation and DocumentMode it is showing grayish areas between unselected tabs which looks quite ugly (see attached screenshot showing the reproducing code below). I assume this is a regression as similar code as shown below has been used in Kdenlive for a long time. No such artifacts artifacts are visible with documentMode set to false or when not using Breeze but Fusion application style. STEPS TO REPRODUCE ``` #include <QApplication> #include <QTabWidget> #include <QWidget> #include <QVBoxLayout> #include <QLabel> #include <QStyleFactory> #include <QIcon> #include <QStyle> int main(int argc, char *argv[]) { // This code reproduces the bug with QTabWidget when: // 1. documentMode is set to true // 3. tab position is set to East or West (vertical tabs) // 4. using Breeze application style (Does not happen on Fusion) // Then, you can see that there are gray rectangular areas shown in betwwen unselected tabs QApplication app(argc, argv); app.setStyle(QStyleFactory::create("breeze")); QWidget window; window.setWindowTitle("QTabWidget Breeze Bug Reproducer"); window.resize(300, 300); QVBoxLayout *mainLayout = new QVBoxLayout(&window); // Create QTabWidget with document mode enabled QTabWidget *tabWidget = new QTabWidget(); tabWidget->setDocumentMode(true); tabWidget->setTabPosition(QTabWidget::East); // Create some content widgets QWidget *page1 = new QWidget(); QWidget *page2 = new QWidget(); QWidget *page3 = new QWidget(); QWidget *page4 = new QWidget(); QVBoxLayout *layout1 = new QVBoxLayout(page1); QVBoxLayout *layout2 = new QVBoxLayout(page2); QVBoxLayout *layout3 = new QVBoxLayout(page3); QVBoxLayout *layout4 = new QVBoxLayout(page4); layout1->addWidget(new QLabel("File Info Page")); layout2->addWidget(new QLabel("Properties Page")); layout3->addWidget(new QLabel("Audio Properties Page")); layout4->addWidget(new QLabel("Metadata Page")); // Add tabs with icon-only (empty text). This is how its used in Kdenlive but it also reproduces with additional text. tabWidget->addTab(page1, QString()); tabWidget->addTab(page2, QString()); tabWidget->addTab(page3, QString()); tabWidget->addTab(page4, QString()); // Set icons for the tabs (using system icons). Also reproduces without icons. tabWidget->setTabIcon(0, QIcon::fromTheme("edit-find")); tabWidget->setTabIcon(1, QIcon::fromTheme("document-edit")); tabWidget->setTabIcon(2, QIcon::fromTheme("audio-volume-high")); tabWidget->setTabIcon(3, QIcon::fromTheme("view-grid")); mainLayout->addWidget(tabWidget); window.show(); return app.exec(); } ``` Build (you may need to adjust this but it works on my system Arch Linux): ``` g++ -I/usr/include/qt6 -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtCore -I/usr/include/qt6/QtGui -o qtabwidget_breeze_bug_reproducer qtabwidget_breeze_bug_reproducer.cpp -lQt6Widgets -lQt6Core -lQt6Gui ``` ``` ./qtabwidget_breeze_bug_reproducer ``` OBSERVED RESULT Unselected tabs are partially obstructed by this grayish overlay in between. EXPECTED RESULT No gray overlays, unselected tabs should not be obstructed and be clearly visible like the selected tab. SOFTWARE/OS VERSIONS Arch Linux, Breeze 6.4.4, KDE Frameworks 6.17, Qt 6.9.1 But I received confirmation from a Windows user reporting the same visuals. Also tried earlier library versions used in Kdenlive 24.12 and it's also showing there so probably not a recent change / regression. ADDITIONAL INFORMATION
Forgot to mention that a workaround is to overwrite the stylesheet like so: ``` tabWidget->setStyleSheet(QStringLiteral("QTabBar::tab:!selected { background: transparent; }")); ``` Then the tabs look like expected also in documentMode=true.
Created attachment 184172 [details] Screenshot of reproducer with workaround applied