def main(): """The main routine.""" # Define the names of the organization and the application # The value is used by the QSettings class when it is constructed using # the empty constructor. This saves having to repeat this information # each time a QSettings object is created. # The default scope is QSettings::UserScope QCoreApplication.setOrganizationName("labsquare") QCoreApplication.setApplicationName("cutevariant") QCoreApplication.setApplicationVersion(__version__) # Process command line arguments app = QApplication(sys.argv) process_arguments(app) # Load app styles load_styles(app) # # Uncomment those line to clear settings # settings = QSettings() # settings.clear() # Set icons set setFontPath(cm.FONT_FILE) # Translations load_translations(app) # debug settings # from cutevariant.gui.settings import * # w = SettingsWidget() # w.show() # Splash screen splash = QSplashScreen() splash.setPixmap(QPixmap(cm.DIR_ICONS + "splash.png")) splash.showMessage(f"Version {__version__}") splash.show() app.processEvents() # Drop settings if old version settings = QSettings() settings_version = settings.value("version", None) if settings_version is None or parse_version( settings_version) < parse_version(__version__): settings.clear() settings.setValue("version", __version__) # Display w = MainWindow() # STYLES = cm.DIR_STYLES + "frameless.qss" # with open(STYLES,"r") as file: # w.setStyleSheet(file.read()) w.show() splash.finish(w) app.exec_()
def __init__(self): QCoreApplication.setOrganizationName('DynArt') QCoreApplication.setApplicationName('TilePad') QCoreApplication.setApplicationVersion('0.4.0') if getattr(sys, 'frozen', False): self.dir = os.path.dirname(sys.executable) else: self.dir = os.path.dirname(__file__) self.dir = self.dir.replace('\\', '/') self.qApp = QApplication(sys.argv) self.mainWindow = MainWindow(self)
# -*- coding: utf-8 -*- import sys from PySide2.QtWidgets import QApplication from PySide2.QtCore import QCoreApplication from notepad import Notepad if __name__ == '__main__': QCoreApplication.setOrganizationName('AdanMercado') QCoreApplication.setOrganizationDomain('https://github.com/adanmercado') QCoreApplication.setApplicationName('Notepad') QCoreApplication.setApplicationVersion('1.0.0') app = QApplication(sys.argv) notepad = Notepad() notepad.showMaximized() sys.exit(app.exec_())
__appname__ = "Easy File Renamer" __module__ = "main" __author__ = "Jose Ivan Lopez Romo" __copyright__ = "Copyright 2018" __license__ = "MIT" __version__ = "1.0.0" __email__ = "*****@*****.**" if __name__ == "__main__": logging.basicConfig( handlers=[logging.FileHandler(LOG_FILE_PATH, encoding='utf-8')], level=logging.INFO, format="%(asctime)s -- %(levelname)s -- %(message)s") QCoreApplication.setApplicationName("EasyFileRenamer") QCoreApplication.setApplicationVersion("1.0") QCoreApplication.setOrganizationName("EasyFileRenamer") QCoreApplication.setOrganizationDomain("www.ivanlopezr.com") logging.info("--- APPLICATION STARTED ---") QApplication.setStyle("fusion") app = QApplication(sys.argv) form = GUI() form.show() sys.exit(app.exec_())