From d5acb04b88373d33b038bb59945fb5ab8b4f543b Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Mon, 20 Apr 2026 16:55:57 -0600 Subject: V8 --- main.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 8e8d4e6..b023b99 100644 --- a/main.py +++ b/main.py @@ -6,14 +6,9 @@ Run: Requirements: pip install PyQt6 pyqtgraph numpy pyserial - -Optional (real hardware): - pip install nidaqmx # NI-DAQmx runtime must also be installed """ -import sys -import os - +import sys, os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from PyQt6.QtWidgets import QApplication @@ -23,12 +18,11 @@ from ui.main_window import MainWindow def main(): app = QApplication(sys.argv) app.setApplicationName("LabDAQ") - app.setOrganizationName("Lab Instruments") - # Note: AA_UseHighDpiPixmaps was removed in PyQt6 — HiDPI is always on - qss_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ui", "style.qss") - with open(qss_path, "r") as f: - app.setStyleSheet(f.read()) + qss = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ui", "style_dark.qss") + if os.path.exists(qss): + with open(qss) as f: + app.setStyleSheet(f.read()) win = MainWindow() win.show() -- cgit v1.2.3