def main(args): qapp=QApplication(sys.argv) kuraapp.initApp(str(guiConf.username), str(guiConf.database), str(guiConf.password), str(guiConf.hostname)) kuraapp.initCurrentEnvironment(1, 1, 1) mainwin = QDialog() combobox = QComboBox(mainwin) comboproxy = ComboProxy(combobox, kuraapp.app.getObjects("lng_user"), guiConf.usernr) mainwin.show() qapp.connect(qapp, SIGNAL('lastWindowClosed()'), qapp, SLOT('quit()')) qapp.exec_loop()
def main(): """ Start function. """ application = QApplication(sys.argv) splashScreen = utils.showSplash("splash_datafinder_admin.png") splashScreen.show() repositoryManager = RepositoryManager() repositoryManager.load() adminMainWindow = AdminMain(repositoryManager) application.connect(application, SIGNAL("lastWindowClosed()"), application, SLOT("quit()")) application.setMainWidget(adminMainWindow) screen = QApplication.desktop().screenGeometry() adminMainWindow.move(QPoint(screen.center().x() - adminMainWindow.width() / 2, screen.center().y() - adminMainWindow.height() / 2)) adminMainWindow.show() splashScreen.close(True) adminMainWindow.fileConnectSlot() application.exec_loop()
def main(args): qapp=QApplication(args) kuraapp.initApp(str(guiConf.username), str(guiConf.database), str(guiConf.password), str(guiConf.hostname)) kuraapp.initCurrentEnvironment(1, 1, 1) app = kuraapp.app mainwin=GuiTable(None, None, None) mainwin.show() mainwin.refresh(app.createObject('lng_lex', fields={})) qapp.connect(qapp, SIGNAL('lastWindowClosed()'), qapp, SLOT('quit()')) qapp.setFont(QFont(guiConf.textfontfamily, guiConf.textfontsize), True) qapp.exec_loop()
def main(): """ Start function. """ application = QApplication(sys.argv) splashScreen = utils.showSplash("splash_datafinder_admin.png") splashScreen.show() repositoryManager = RepositoryManager() repositoryManager.load() adminMainWindow = AdminMain(repositoryManager) application.connect(application, SIGNAL("lastWindowClosed()"), application, SLOT("quit()")) application.setMainWidget(adminMainWindow) screen = QApplication.desktop().screenGeometry() adminMainWindow.move( QPoint(screen.center().x() - adminMainWindow.width() / 2, screen.center().y() - adminMainWindow.height() / 2)) adminMainWindow.show() splashScreen.close(True) adminMainWindow.fileConnectSlot() application.exec_loop()
# girdiyi gönder. ret = self.server.addEntry(username, password, str(self.filename), str(text.utf8()), self.inEdit) if not ret: QMessageBox.critical(self, "HATA", u"Girdi yayınlanamadı!") else: QMessageBox.information(self, "Bitti", u"Girdi başarı ile yayınlandı!") self._fillEntryList() # yayınladıktan sonra eğer içindeysek, EditMode'dan # çıkalım. Ve metin girişini temizleyelim. if self.inEdit: self.setEditMode(False) self.w.entryText.clear() def slotQuit(self): self.close() if __name__ == "__main__": app = QApplication(sys.argv) app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) win = BlogWin() win.show() app.exec_loop()