BATS.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:BATS-Bayesian-Adaptive-Trial-Simulator 作者: ContaTP 项目源码 文件源码
def main():

    # Set a unique id to BATS
    import ctypes
    appid = 'bats.1.1.0'
    # Check the platform. If windows, set an ID so it will be in the task bar.
    if sys.platform == 'win32':

       ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appid)

    elif sys.platform == 'linux':

       pass

    elif sys.platform == 'darwin':

        pass

    else:

      sys.stdout.write("The application is not supported in this system")
      pass

    # Create the application
    app = QtWidgets.QApplication(['Bayesian Adaptive Trial Simulator'])
    # Add icon for the application
    app_icon = QtGui.QIcon()
    app_icon.addFile(":/resources/bcts.png", QtCore.QSize(16,16))
    app_icon.addFile(":/resources/bcts.png", QtCore.QSize(24,24))
    app_icon.addFile(":/resources/bcts.png", QtCore.QSize(32,32))
    app_icon.addFile(":/resources/bcts.png", QtCore.QSize(48,48))
    app_icon.addFile(":/resources/bcts.png", QtCore.QSize(256,256))
    app.setWindowIcon(app_icon)
    # Add font to the font database
    QtGui.QFontDatabase().addApplicationFont(":/resources/font/Caviar_Dreams_Bold.ttf")
    QtGui.QFontDatabase().addApplicationFont(":/resources/font/PTsans.ttf")
    # Initialize the GUI
    window = BATSWindow()
    window.show()
    # Run the app
    sys.exit(app.exec_())



# Initialize of the app
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号