Separate css file for GUI
This commit is contained in:
+3
-6
@@ -1,4 +1,5 @@
|
|||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide2.QtCore import Qt
|
||||||
from PySide2.QtWidgets import QApplication
|
from PySide2.QtWidgets import QApplication
|
||||||
@@ -16,12 +17,8 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
app.setStyleSheet("""
|
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'style.css')) as css:
|
||||||
QWidget{
|
app.setStyleSheet(css.read())
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
""")
|
|
||||||
|
|
||||||
geometry = app.screens()[0].size()
|
geometry = app.screens()[0].size()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
QWidget{
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user