def ExecRootApp(): check_dependencies() root = QApplication(argv) app = Initialize() app.setWindowIcon(QIcon('rsc/icon.ico')) app.center(), app.show() exit(root.exec_())
#!/usr/bin/env python2.7 from sys import argv from PyQt4.QtGui import * from Core.Main import Initialize from Core.check import check_dependencies if __name__ == '__main__': check_dependencies() root = QApplication(argv) app = Initialize(None) app.setWindowIcon(QIcon('rsc/icon.ico')) app.center() app.show() root.exec_()
def ExecRootApp(root): app = Initialize() app.setWindowIcon(QIcon('rsc/icon.ico')) app.center(), app.show() exit(root.exec_())
def checkAppQTDesigner(style): from PyQt4.QtGui import QMessageBox if 'gtk+' in str(style).lower(): QMessageBox.warning(None,'warning: bug GUI Qt::style ', "\nPyQt4 app looks different when running with root, because of that the GUI not work 100%," " some features not work. I don't find anything code or settings for fix this bug " "(if you have any solution for this send me feedback :D).\n\n" 'if you want keep the normal user style, run app with "sudo".') exit(-1) if __name__ == '__main__': from Core.loaders.checker.check_depen import check_dep_pumpkin,RED,ENDC check_dep_pumpkin() from os import getuid if not getuid() == 0: exit('[{}!{}] WiFi-Pumpkin must be run as root.'.format(RED,ENDC)) from PyQt4.QtGui import QApplication,QIcon main = QApplication(argv) checkAppQTDesigner(main.style().objectName()) from Core.Main import Initialize print('Loading GUI...') app = Initialize() app.setWindowIcon(QIcon('Icons/icon.ico')) app.center() app.show() print('WiFi-Pumpkin Running!') exit(main.exec_())