From 9b682564eea5e6e26823aecf7bd5631443e6ce3a Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Tue, 7 Nov 2023 20:42:34 +0000 Subject: [PATCH] WIP V3: remove redundant test.py --- test.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 test.py diff --git a/test.py b/test.py deleted file mode 100755 index 3658d12..0000000 --- a/test.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python - -from PyQt5 import QtGui, QtWidgets - - -class TabBar(QtWidgets.QTabBar): - def paintEvent(self, event): - painter = QtWidgets.QStylePainter(self) - option = QtWidgets.QStyleOptionTab() - for index in range(self.count()): - self.initStyleOption(option, index) - bgcolor = QtGui.QColor(self.tabText(index)) - option.palette.setColor(QtGui.QPalette.Window, bgcolor) - painter.drawControl(QtWidgets.QStyle.CE_TabBarTabShape, option) - painter.drawControl(QtWidgets.QStyle.CE_TabBarTabLabel, option) - - -class Window(QtWidgets.QTabWidget): - def __init__(self): - QtWidgets.QTabWidget.__init__(self) - self.setTabBar(TabBar(self)) - for color in "tomato orange yellow lightgreen skyblue plum".split(): - self.addTab(QtWidgets.QWidget(self), color) - - -if __name__ == "__main__": - import sys - - app = QtWidgets.QApplication(sys.argv) - window = Window() - window.resize(420, 200) - window.show() - sys.exit(app.exec_())