[1033] Run the batch file of the PyQt GUI, but don't show the CMD

alex_bn_lee / 2024-07-16 / 原文

I built a GUI layout using PyQt, and I run the Python file with a .bat file. However, this method initially displays the CMD window before showing the program's main window, which looks a bit odd. To prevent or minimize the CMD window from appearing, follow these steps:

  • Right-click the .bat file and select Create shortcut
  • Right-click the shortcut and choose Properties 
  • Under the Shortcut tab, change the Run option to Minimized