Skip to content

Commit

Permalink
✨ Add a specific pid for the app
Browse files Browse the repository at this point in the history
  • Loading branch information
NoaSecond committed Jun 3, 2024
1 parent 044e4c9 commit d9cf8c1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys
import ctypes
from PySide6 import QtCore, QtWidgets, QtGui, QtUiTools
from PySide6.QtCore import QTimer
from scripts.settings import Settings
Expand All @@ -8,6 +9,19 @@
from datetime import datetime
import scripts.realTimePlot as realTimePlot

def set_app_user_model_id(app_id):
"""
Sets the current process explicit AppUserModelID.
Parameters:
- app_id (str): The AppUserModelID to set.
Returns:
None
"""
if os.name == 'nt':
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(app_id)


def loadUiWidget(uifilename, parent=None):
"""
Expand Down Expand Up @@ -145,6 +159,7 @@ def refresh_ports():


if __name__ == "__main__":
set_app_user_model_id("aima.minicyc")
app = QtWidgets.QApplication([])
MainWindow = loadUiWidget("GUI.ui")
MainWindow.setWindowTitle("MiniCyc")
Expand Down

0 comments on commit d9cf8c1

Please sign in to comment.