Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 4bf771a

Browse files
committed
make pyqt stylesheet optional, remove requirement
1 parent 1eae3f9 commit 4bf771a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pyblish_simple/view.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import pyblish.util
66
import pyblish.api
7-
import PyQt5_stylesheets
87

98

109
class Ui_Form(QtWidgets.QDialog):
@@ -14,7 +13,14 @@ def __init__(self, parent=None):
1413
self.populate_ui()
1514

1615
def create_ui(self):
17-
self.setStyleSheet(PyQt5_stylesheets.load_stylesheet_pyqt5(style="style_Dark"))
16+
17+
# optional stylesheet
18+
try:
19+
import PyQt5_stylesheets
20+
self.setStyleSheet(PyQt5_stylesheets.load_stylesheet_pyqt5(style="style_Dark"))
21+
except ImportError:
22+
pass
23+
1824
self.dropdown_families = QtWidgets.QComboBox()
1925
# self.dropdown_validators = QtWidgets.QComboBox()
2026
self.list_instance = QtWidgets.QListWidget()
@@ -80,7 +86,6 @@ def clicked_check(self):
8086
self.populate_families_dropdown()
8187
self.populate_instances_list()
8288
# rerun validation plugins
83-
pass
8489

8590
def clicked_fix(self):
8691
# TODO run fix action on plugins that failed/warning
@@ -98,7 +103,6 @@ def clicked_fix(self):
98103
# TODO rerun validation
99104
# TODO update UI
100105
self.clicked_check()
101-
pass
102106

103107
# TODO make actions feel less hacky
104108
def eventFilter(self, source, event):

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
Qt.py
2-
https://github.com/RedFalsh/PyQt5_stylesheets

0 commit comments

Comments
 (0)