def main(): a = QApplication(sys.argv) a.setQuitOnLastWindowClosed(True) a.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5()) # or in new API a.setStyleSheet(qdarkstyle.load_stylesheet(qt_api='pyqt5')) main_window = MainWindow() main_window.show() sys.exit(a.exec_())
def main(): global dbConn global dbCur global sock global signInDialog global mainWindow global regDialog dbConn = sqlite3.connect('data.db') dbCur = dbConn.cursor() ## load the hostname and port info from config.json # loadClientConfig() DBInit.init() sock = socket(AF_INET, SOCK_STREAM) sock.connect((host,port)) app = QApplication(sys.argv) mainWindow = MainWindow() regDialog = RegisterDialog() signInDialog = SignInDialog() signInDialog.ui.registerButton.clicked.connect(launchRegisterDiag) regDialog.ui.resetButton.clicked.connect(resetRegisterDiag) regDialog.ui.registerButton.clicked.connect(register) mainWindow.ui.friendListView.doubleClicked.connect(newChatDialog) ## Check if the user token is stored... x = dbCur.execute('SELECT * FROM USER') mainWindow.show() signInDialog.setSock(sock) if len(list(x)) == 0: ## open the login dialog mainWindow.ui.friendsOnlineLabel.setText('You Must Login to continue...') mainWindow.ui.label.setText('<font color="RED"><b>You are not Logged In!</b></font>') mainWindow.ui.friendListView.hide() signInDialog.show() else: signInDialog.show() _thread.start_new_thread(checkSignedIn, ()) sys.exit(app.exec_())
def Login(self, event): from GUI.MainWindow import MainWindow print(event.widget) if self.DataBaseEntry.get() == "Prueba": if self.PasswordEntry.get() == "Password": main_window = MainWindow() main_window.mainloop() print("Correcto") else: print("La contraseña no es correcta") else: print("El usuario no es correcto")
def main(): app = QApplication(sys.argv) mainwindow = MainWindow() currentScreenWid = QApplication.desktop().width() currentScreenHei = QApplication.desktop().height() x = currentScreenWid / 1920.0 y = currentScreenHei / 1080.0 mainwindow.setMinimumSize(1366 * x, 768 * y) mainwindow.setGeometry( (QApplication.desktop().width() - mainwindow.width()) / 2, (QApplication.desktop().height() - mainwindow.height()) / 2, 1366 * x, 768 * y) mainwindow.show() sys.exit(app.exec_())
def __init__(self, controller: Controller): super().__init__() self._controller = controller self._app = QApplication([]) self._window = QWidget() self._window.setWindowTitle( QCoreApplication.translate("Project - ISBN Analysis", "Project - ISBN Analysis")) self._window.setFixedSize(930, 600) self._toolbar = Toolbar(self._window, self._controller) self._main = MainWindow(self._window, self._controller) self._window.show() sys.exit(self._app.exec())
def play(self): pygame.init() window = MainWindow(self.test_string) window.textWindow() """
def main(): app = QApplication(sys.argv) window = MainWindow() window.showFullScreen() #window.show() app.exec_()
from GUI.MainWindow import MainWindow from PyQt5.QtWidgets import QApplication import sys app = QApplication(sys.argv) win = MainWindow() win.show() sys.exit(app.exec_())
import PyQt5 import sys from GUI.MainWindow import MainWindow if __name__ == '__main__': App = PyQt5.QtWidgets.QApplication(sys.argv) mainWindow = MainWindow() sys.exit(App.exec())
from GUI.MainWindow import MainWindow if __name__ == '__main__': app = MainWindow() app.mainloop()
def main(): a = QApplication(sys.argv) a.setQuitOnLastWindowClosed(True) main_window = MainWindow() main_window.show() sys.exit(a.exec_())
""" 作者:byack 邮箱:[email protected] 注解:本项目仅供学习,不用于任何商业用途,刚学了爬虫和Pyqt5,功能比较少,后续我会尽量跟进,不断跟新,图标和部分代码, 还有一些网易云接口均来源于网络,在次表示感谢 """ from GUI.MainWindow import MainWindow from PyQt5.QtWidgets import * import sys if __name__ == '__main__': app = QApplication(sys.argv) main = MainWindow() main.show() sys.exit(app.exec_())
def main(): rospy.init_node('RiC_GUI') app = QApplication(sys.argv) form = MainWindow() form.show() app.exec_()
def main(): app = QtWidgets.QApplication(sys.argv) window = MainWindow() window.show() return app.exec_()
import sys from PySide2.QtWidgets import QApplication from freebitcoin.API import API from GUI.MainWindow import MainWindow if __name__ == '__main__': app = QApplication(sys.argv) mainWindow = MainWindow() mainWindow.show() sys.exit(app.exec_())
def main(): rospy.init_node('gps_status') app = QApplication(sys.argv) form = MainWindow() form.show() app.exec_()
import sys from PyQt5.QtWidgets import QApplication from GUI.MainWindow import MainWindow if __name__ == '__main__': app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_())
print("Loading the model...") filePath = 'Results/' #modelName = 'Classic' modelName = 'OneLevel' # modelName = 'Feedback' trainingSetName = 'Total' # trainingSetName = 'Partial' # trainingSetName = 'Spanish' # trainingSetName = 'English' encoderName = '-CCE' #encoderName = '-RLE' #encoderName = '-TRE' fileName = filePath + modelName + trainingSetName + encoderName with open(fileName + '.pck', 'rb') as modelFile: model = cPickle.load(modelFile) print("Done!") #model.train(MTS.trainingData, 5, verbose=0) #TestSuite.testModel(model, trainingSet.trainingData, # fileName=(fileName + '_Results')) app = QApplication([]) window = MainWindow(model) #app.exec_() sys.exit(app.exec_())
Constantes.REPERTOIRE_CONFIGURATION, \ Constantes.REPERTOIRE_LOGS, \ Constantes.REPERTOIRE_PLUGIN_PERSO ] for repertoire in repertoires: if( not os.path.isdir( repertoire ) ): logger.info( "création du répertoire %s" %( repertoire ) ) os.makedirs( repertoire ) # On demarre le CLI ou le GUI ? if( options.cli == False and options.dialog == False ): # On importe les fichiers necessaires pour le GUI try: from PyQt4 import QtGui except ImportError: logger.critical( "ouuupppss : il vous faut PyQt4 pour pouvoir utiliser ce programme..." ) sys.exit( 1 ) from GUI.MainWindow import MainWindow # On creer l'interface graphique app = QtGui.QApplication( sys.argv ) window = MainWindow() window.show() sys.exit( app.exec_() ) elif( options.cli == True ): from CLI.cli import cli cli() else: from CLIDialog.CLIDialog import CLIDialog CLIDialog()
from GUI.MainWindow import MainWindow import sys from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) ex = MainWindow() sys.exit(app.exec_())
def play2(self): pygame.init() window2 = MainWindow(self.test_string) time.sleep(2) window2.run()
# creation date: ? # version: 0.0.1 # # Module contains main application. Run this script to run main program # ############################################################################### import sys from PyQt4 import QtGui from GUI.LoginWindow import LoginWindow from GUI.MainWindow import MainWindow app = QtGui.QApplication(sys.argv) #TODO: done in some lazy way. Try to reconstruct this loginCounts = 0 while loginCounts < 3: ret=LoginWindow().exec_() if ret == 1: wMain = MainWindow() wMain.showFullScreen() wMain.setWindowTitle('Tablica synoptyczna') #w.setWindowFlags(w.windowFlags()&~QtCore.Qt.WindowStaysOnTopHint) wMain.show() break elif ret == 2: loginCounts += 1 else: loginCounts = 3 if loginCounts > 2: sys.exit(0) sys.exit(app.exec_())
def main(): rospy.init_node('ric_imuCalib') app = QApplication(sys.argv) form = MainWindow() form.show() app.exec_()
import sys from PyQt5.QtWidgets import * from GUI.MainWindow import MainWindow if __name__ == "__main__": app = QApplication(sys.argv) window = MainWindow() window.resize(1200, 600) window.show() app.exec_()