Newer
Older
Garrett Bates
committed
import sys
from sohstationviewer.view.main_window import MainWindow
Garrett Bates
committed
# 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'
Garrett Bates
committed
def main():
app = QtWidgets.QApplication(sys.argv)
wnd = MainWindow()
wnd.show()
sys.exit(app.exec_())
Garrett Bates
committed
if __name__ == '__main__':
main()