0

I have the following output:

Sample Image

from the following simple Tab classes:

class TabBar(QTabBar):
    def __init__(self, parent=None):
        super(TabBar, self).__init__(parent)
        self.setStyleSheet('''QTabBar:tab {
                            border-image: url(resources/images/tab_bar2.png)}
                            QTabBar:pane {border: 0px; padding: 0px; margin:0px}
                           ''')
    def tabSizeHint(self, index):
        return QSize(90, 40)


class TabWidget(QTabWidget):
    def __init__(self, parent=None):
        super(TabWidget, self).__init__(parent)
        self.setTabBar(TabBar(self))

        self.setStyleSheet('''
                            QTabWidget::tab-bar {
                                alignment: center;}
                            QTabWidget:pane{border: 0px}''')

I am trying to remove the gray line on top of the tabs. I tried setting/border/margins/padding/ setContentsMargins to 0 but still get no results. I did not include anything that would involve a gray line so I am puzzled as to why or how this is happening.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Fer-de-lance
  • 375
  • 5
  • 23

1 Answers1

1

I found an answer here I just needed to basically add: QTabBar {qproperty-drawBase: 0;}

Fer-de-lance
  • 375
  • 5
  • 23