Subdomain Posts
None | 39 days ago
None | 39 days ago
None | 41 days ago
Python | 54 days ago
SQL | 130 days ago
SQL | 130 days ago
SQL | 137 days ago
SQL | 144 days ago
None | 144 days ago
SQL | 144 days ago
Recent Posts
None | 6 sec ago
C++ | 45 sec ago
None | 53 sec ago
None | 1 min ago
Python | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
ActionScript 3 | 1 min ago
XML | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By pyqt4 on the 26th of Jan 2010 05:15:56 PM Download | Raw | Embed | Report
  1. #!/usr/bin/python
  2.  
  3. # inputdialog.py
  4.  
  5. import sys
  6. from PyQt4 import QtGui
  7. from PyQt4 import QtCore
  8.  
  9.  
  10. class InputDialog(QtGui.QWidget):
  11.     def __init__(self, parent=None):
  12.         QtGui.QWidget.__init__(self, parent)
  13.         self.currentResult = FuzzNumber()
  14.  
  15.         self.setWindowTitle('Fuzzy stuff')
  16.  
  17.         self.layout = QtGui.QGridLayout()
  18.  
  19.         self.addButtons()
  20.  
  21.         #self.button = QtGui.QPushButton('Calculate', self)
  22.         #self.layout.addWidget( self.button )
  23.  
  24.         self.resultLabel = QtGui.QLabel(self)
  25.  
  26.         self.lineedit = QtGui.QLineEdit(self)
  27.         self.layout.addWidget( self.resultLabel, 0, 1, 1, 2 )
  28.         self.layout.addWidget( self.lineedit, 1, 1, 1, 2 )
  29.         self.connect(self.additionButton, QtCore.SIGNAL('clicked()'), self.add)
  30.  
  31.         self.setLayout( self.layout )
  32.  
  33.     def addButtons(self):
  34.         self.additionButton = QtGui.QPushButton('+', self)
  35.         self.layout.addWidget( self.additionButton, 2, 1 )
  36.  
  37.         self.multiplicationButton = QtGui.QPushButton('*', self)
  38.         self.layout.addWidget( self.multiplicationButton, 2, 2 )
  39.  
  40.     def add(self):
  41.         # func()
  42.         CONNECT
  43.         self.currentResult = self.currentResult() + FuzzNumber( self.lineedit.getInte )
  44.         self.resultLabel.setText( self.lineedit.text() + self.resultLabel.text() )
  45.         self.lineedit.clear()
  46.         self.resultLabel.show()
  47.  
  48.  
  49. app = QtGui.QApplication(sys.argv)
  50. icon = InputDialog()
  51. icon.show()
  52. app.exec_()
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: