def main(): QCoreApplication.setOrganizationName("Oleg Evseev") QCoreApplication.setOrganizationDomain("x3n.me") QCoreApplication.setApplicationName("BCI") app = App(sys.argv) return app.exec_()
def main(): app = QApplication([]) QCoreApplication.setOrganizationName(APPLICATION_NAME) QCoreApplication.setApplicationName(APPLICATION_NAME) widget = WarmuppyWindow() widget.show() sys.exit(app.exec_())
def __init__(self, args): super(App, self).__init__() QCoreApplication.setOrganizationName('Dynart') QCoreApplication.setApplicationName('NodeEditor') self._qApp = QApplication(args) self._qApp.setStyle(Style()) self._mainWindow = MainWindow(self) self._mainWindow.show()
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 temp_settings(): temp_home = tempfile.TemporaryDirectory() os.environ['HOME'] = temp_home.name os.environ['WARMUPPY_DEBUG'] = 'TRUE' QCoreApplication.setOrganizationName(APPLICATION_NAME) QCoreApplication.setApplicationName(APPLICATION_NAME) app = Warmuppy() app.settings.sync() yield app, temp_home.name
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)
def temp_settings(): temp_home = tempfile.TemporaryDirectory() os.environ['HOME'] = temp_home.name QCoreApplication.setOrganizationName(APPLICATION_NAME) QCoreApplication.setApplicationName(APPLICATION_NAME) q_settings = QSettings() q_settings.setValue('instrument', 123) q_settings.beginWriteArray('exercises') q_settings.setValue('sample1', ['1', '2', '3']) q_settings.setValue('sample2', ['4', '5', '6']) q_settings.endArray() q_settings.sync() settings = Settings() yield settings
def main(): # Kill the program when ctrl-c is used signal.signal(signal.SIGINT, signal.SIG_DFL) QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts) QCoreApplication.setOrganizationName('hexrd') QCoreApplication.setApplicationName('hexrd') app = QApplication(sys.argv) window = MainWindow() window.ui.show() sys.exit(app.exec_())
def __init__(self, parent=None): super(PypePlayer, self).__init__(parent) QCoreApplication.setOrganizationName('Ted') QCoreApplication.setApplicationName('PypePlayer') self.setting_dialog = settings_widget() self.setting_dialog.settings_saved.connect(self.read_settings) self.player = Player(parent=self) self.setCentralWidget(self.player) self.viewer = Viewer(parent=self) self.menu_controller = MenuController(self, self.menuBar()) self._create_menu() self.update_actions() self.player.media_loaded.connect(self.set_window_title) self.player.stopped.connect(self.set_window_title) self.read_settings() self.set_window_title('') self.show() self.adjust_header_act.trigger()
def main(): import sys QCoreApplication.setOrganizationName("QtExamples") QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) WebUiHandler.registerUrlScheme() app = QApplication(sys.argv) profile = QWebEngineProfile() handler = WebUiHandler() profile.installUrlSchemeHandler(WebUiHandler.schemeName, handler) page = QWebEnginePage(profile) page.load(WebUiHandler.aboutUrl) view = QWebEngineView() view.setPage(page) view.setContextMenuPolicy(Qt.NoContextMenu) view.resize(500, 600) view.show() sys.exit(app.exec_())
def main(): # Kill the program when ctrl-c is used signal.signal(signal.SIGINT, signal.SIG_DFL) QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts) QCoreApplication.setOrganizationName('hexrd') QCoreApplication.setApplicationName('hexrd') app = QApplication(sys.argv) data = resource_loader.load_resource(hexrd.ui.resources.icons, 'hexrd.ico', binary=True) pixmap = QPixmap() pixmap.loadFromData(data, 'ico') icon = QIcon(pixmap) app.setWindowIcon(icon) window = MainWindow() window.set_icon(icon) window.show() sys.exit(app.exec_())
# -*- 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_())
import os import sys import struct if os.name == 'nt': import PySide2 dirname = os.path.dirname(PySide2.__file__) plugin_path = os.path.join(dirname, 'plugins', 'platforms') os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path from PySide2.QtCore import QCoreApplication from PySide2.QtWidgets import QApplication QCoreApplication.setOrganizationName("UFAL") QCoreApplication.setOrganizationDomain("ufal.ms.mff.cuni.cz") QCoreApplication.setApplicationName("Alignmeet") if os.name == 'nt': arch = struct.calcsize('P') * 8 if arch == 64 and os.path.exists("""C:\Program Files\VideoLAN\VLC"""): os.environ[ 'PYTHON_VLC_MODULE_PATH'] = """C:\Program Files\VideoLAN\VLC""" elif arch == 32 and os.path.exists( """C:\Program Files (x86)\VideoLAN\VLC"""): os.environ[ 'PYTHON_VLC_MODULE_PATH'] = """C:\Program Files (x86)\VideoLAN\VLC""" else: os.environ['PYTHON_VLC_MODULE_PATH'] = """program/vlc-3.0.9.2"""
__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_())
from PySide2.QtCore import QSettings, QCoreApplication from PySide2.QtWidgets import QApplication except ImportError: import tkinter.messagebox as tkmb tkmb.showerror('Errore!', 'Non è possibile importare le librerie esterne necessarie per il funzionamento del ' 'programma.\nSi prega di installarle con il seguente comando:\npip install -r ' 'requirements.txt') exit() from src.windows.MainWindow import MainWindow # Set info QCoreApplication.setApplicationName('Risolutore approssimativo di equazioni') QCoreApplication.setApplicationVersion('1.0') QCoreApplication.setOrganizationName('maicol07') QCoreApplication.setOrganizationDomain('maicol07.it') app = QApplication(sys.argv) # Load style settings = QSettings('settings.ini', QSettings.IniFormat) theme = settings.value('appearance/style') if theme: app.setStyle(theme) font = settings.value('appearance/font') if font: app.setFont(font) window = MainWindow()
if (c != old): dial_map[0].setValue(c.red()) dial_map[1].setValue(c.green()) dial_map[2].setValue(c.blue()) color_button = QPushButton("color") color_button.clicked.connect(color_button_clicked) group_leds.layout().addWidget(led_mode_combo, 3, 1) group_leds.layout().addWidget(commit_led_button, 3, 2) group_leds.layout().addWidget(color_button, 3, 0) #dsp.refresh() #timer = QtCore.QTimer() #timer.setInterval(5000) #timer.timeout.connect(timer_timeout) #timer.start() main_window = MainWindow() #tx_worker.start() main_window.show() #GUI = Window() QCoreApplication.setOrganizationName("Julian Schick") QCoreApplication.setApplicationName("FlipUI") app.exec_()
self.ui = Ui_main() self.window.ui = self.ui self.ui.setupUi(self.window) self.window.show() splash.finish(self.window) if __name__ == "__main__": # compile python qt form.ui into python file os.system('pyside2-uic -o src/ui_form.py qt_resources/form.ui') from ui_form import Ui_main # setup logging initialize_logger("./log") # pysde2 settings config QCoreApplication.setOrganizationName("OTH Regensburg") QCoreApplication.setApplicationName("MAEsure") # init application app = App(sys.argv) app.processEvents() app.ui.actionAbout_MAEsure.triggered.connect( lambda: AboutDialog(app.window)) # execute qt main loop sys.exit(app.exec_())
self.repaint() def reset(self) -> None: self.events = [] self.text = ' '.join([ choice(list(self.config['dictionary'])).lower() for _ in range(self.settings.value('wordsCount', 20)) ]) self.pointer = 0 def setupWindow(self) -> None: self.setWindowTitle('Typetific') self.setMinimumSize(1100, 620) self.setUnifiedTitleAndToolBarOnMac(True) self.setStyleSheet('background: {}; color: {};'.format( self.config['background_color'].name(), self.config['primary_color'].name())) if __name__ == '__main__': app = QApplication() window = TypingWindow() QCoreApplication.setApplicationName(window.windowTitle()) QCoreApplication.setOrganizationName('Breitburg Ilya') QCoreApplication.setOrganizationDomain('breitburg.com') window.show() app.exec_()
# This Python file uses the following encoding: utf-8 import sys from PySide2.QtWidgets import QApplication from PySide2.QtCore import QSettings, QCoreApplication from opengene.views.main_window import MainWindow if __name__ == "__main__": app = QApplication([]) QCoreApplication.setApplicationName("OpenGene") QCoreApplication.setOrganizationName("MininuxDev") main_window = MainWindow() sys.exit(app.exec_())
from PySide2.QtCore import QCoreApplication, Qt, QTranslator from PySide2.QtGui import QGuiApplication, QIcon, QFont from scihub_eva.globals.versions import * from scihub_eva.globals.preferences import * from scihub_eva.utils.preferences_utils import * from scihub_eva.utils.sys_utils import * from scihub_eva.utils.path_utils import * from scihub_eva.ui.scihub_eva import UISciHubEVA if __name__ == '__main__': app_path = os.path.abspath(os.path.dirname(sys.argv[0])) os.environ['QT_QUICK_CONTROLS_CONF'] = ( PREFERENCES_DIR / 'qtquickcontrols2.conf').resolve().as_posix() QCoreApplication.setOrganizationName(ORGANIZATION_NAME) QCoreApplication.setOrganizationDomain(ORGANIZATION_DOMAIN) QCoreApplication.setApplicationName(APPLICATION_NAME) QGuiApplication.setAttribute(Qt.AA_EnableHighDpiScaling) QGuiApplication.setAttribute(Qt.AA_UseHighDpiPixmaps) QGuiApplication.setAttribute(Qt.AA_ShareOpenGLContexts) app = QGuiApplication(sys.argv) lang = Preferences.get_or_default(SYSTEM_LANGUAGE_KEY, SYSTEM_LANGUAGE) lang_file_path = ( I18N_DIR / 'SciHubEVA_{lang}.qm'.format(lang=lang)).resolve().as_posix() translator = QTranslator() translator.load(lang_file_path)
QCoreApplication.processEvents() time.sleep(0.01) self.epoch_bridge.test_accuracy = min((i * i) * 3.978, 100) self.epoch_bridge.test_loss = 1 / i self.epoch_done.emit(self.epoch_bridge.epoch, self.epoch_bridge.test_loss) print('This is gonna be a longer Log message. Epoch ' + str(i) + ' done') # Set the QtQuick configuration file path os.environ['QT_QUICK_CONTROLS_CONF'] = "res/qml/qtquickcontrols2.conf" # Need to set an organization name in order to suppress warning thrown # see https://forum.qt.io/topic/104546/qml-file-dialog-warning QCoreApplication.setOrganizationName("Some organization") # Create an instance of the application # QApplication MUST be declared in global scope to avoid segmentation fault app = QApplication(sys.argv) console_stream = StringBuffer() sys.stdout = console_stream # Create QML engine engine = QQmlApplicationEngine() bridges = {'epoch_bridge': EpochBridge(), 'settings_bridge': SettingsBridge()} bridges['control_bridge'] = ControlBridge( epoch_bridge=bridges['epoch_bridge'],
from PySide2.QtWidgets import QApplication, QMessageBox from PySide2.QtGui import QDesktopServices from PySide2.QtCore import QUrl, QCoreApplication from os import environ, pathsep import sys import gui from selenium import webdriver from selenium.common.exceptions import WebDriverException app = QApplication(sys.argv) QCoreApplication.setOrganizationName("muSync") QCoreApplication.setOrganizationDomain("musync.link") QCoreApplication.setApplicationName("muSync") QCoreApplication.setApplicationVersion("0.5.0") try: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("headless") chrometest = webdriver.Chrome(executable_path="chromedriver", options=chrome_options) chrometest.quit() except WebDriverException as e: if "executable needs to be in PATH" in e.msg: d = QMessageBox( QMessageBox.Critical, "Chromedriver not found", """Chromedriver was not found in the path. Please download Chromedriver from the following address and unzip it in any directory in the system PATH: