Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. import sys
  2. from PyQt4 import QtGui, QtCore
  3.  
  4.  
  5. class AntGui(QtGui.QWidget):
  6.     def __init__(self, parent=None):
  7.         QtGui.QWidget.__init__(self, parent)
  8.        
  9.         self.setGeometry(300, 300, 250, 150)
  10.         self.setWindowTitle('Antz Anim Daily Submit v1.0')
  11.        
  12.         self.setToolTip('CopyRight @ogarcia tool')
  13.         QtGui.QToolTip.setFont(QtGui.QFont('oldEnglish', 10))
  14.        
  15.         quit = QtGui.QPushButton('Submit Daily!', self)
  16.         quit.setGeometry(55, 100, 130, 35)
  17.     def confirmSubmit(self, event):
  18.         confirm = QtGui.QMessageBox.question(self, 'Confirm Submit', "Are you sure you want to submit?", QtGui.QMessagebox.Yes, QtGui.QMessageBox.No)
  19.        
  20.         if confirm == QtGui.QMessageBox.Yes:
  21.             event.accept()
  22.         else:
  23.             event.ignore() 
  24.        
  25.        
  26.         self.connect(quit, QtCore.SIGNAL('clicked()'), QtGui.qApp, QtCore.SLOT('confirmSubmit'))
  27.    
  28.        
  29. app = QtGui.QApplication(sys.argv)
  30. qb = AntGui()
  31. qb.show()
  32. sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement