#!/usr/bin/env python3 import platform import os import sys from PySide2 import QtWidgets from sohstationviewer.view.main_window import MainWindow # Enable Layer-backing for MacOs version >= 11 # Only needed if using the pyside2 library with version>=5.15. # Layer-backing is always enabled in pyside6. os_name, version, *_ = platform.platform().split('-') # if os_name == 'macOS' and version >= '11': # mac OSX 11.6 appear to be 10.16 when read with python and still required this # environment variable if os_name == 'macOS': os.environ['QT_MAC_WANTS_LAYER'] = '1' def main(): app = QtWidgets.QApplication(sys.argv) wnd = MainWindow() wnd.show() sys.exit(app.exec_()) if __name__ == '__main__': main()