From bfedea1a3717db37a72d0d24fee49c83aa247ae6 Mon Sep 17 00:00:00 2001 From: Davi Coelho Date: Tue, 10 Jan 2023 00:07:56 -0300 Subject: [PATCH] =?UTF-8?q?atualiza=C3=A7=C3=A3o=20do=20pyinstaller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/main.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gui/main.py b/gui/main.py index 975b961..b211ca9 100644 --- a/gui/main.py +++ b/gui/main.py @@ -15,9 +15,15 @@ def main(): window = MainWindow() window.show() - with open("style/dark/darktheme.qss", "r") as f: - _style = f.read() - app.setStyleSheet(_style) + try: + with open("style/dark/darktheme.qss", "r") as f: + _style = f.read() + app.setStyleSheet(_style) + + except: + with open("data\darktheme.qss") as f: + _style = f.read() + app.setStyleSheet(_style) @@ -28,3 +34,4 @@ def main(): main() +##pyinstaller --windowed .\gui\main.py --paths C:\Users\davip\Documents\Projetos\2DpsNotes --add-data 'C:\Users\davip\Documents\Projetos\2DpsNotes\style\dark\darktheme.qss;data' \ No newline at end of file