diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2026-04-13 15:22:56 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2026-04-13 15:22:56 -0600 |
| commit | 2ed9d37da7b27d25173535550fb92702225ac14e (patch) | |
| tree | d6ff360a656e577629d3cefdaa1ae02af7255864 /main.py | |
| parent | 8d6acf3a8ea4b37f86b321dbf430be5be01b1267 (diff) | |
Removed QtPy5 snippet and fixed directories
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +""" +main.py — LabDAQ entry point. + +Run: + python main.py + +Requirements: + pip install PyQt6 pyqtgraph numpy pyserial + +Optional (real hardware): + pip install nidaqmx # NI-DAQmx runtime must also be installed +""" + +import sys +import os + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +from PyQt6.QtWidgets import QApplication +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()) + + win = MainWindow() + win.show() + sys.exit(app.exec()) + + +if __name__ == "__main__": + main() |
