Commits

anatoly techtonik committed b61e590

04.dialog.color.py: rough up comments

  • Participants
  • Parent commits e21550a

Comments (0)

Files changed (1)

File 04.dialog.color.py

 # The code is placed into public domain by anatoly techtonik
 # Feel free to copy/paste wherever you like
 
-# Absolutely minimal example of PySide application with button
+# Absolutely minimal example of PySide application with button calling dialog
 
 from PySide.QtGui import QApplication, QPushButton
 
 app = QApplication([])
-
-# Create button (which is also top level window)
+    
+# Create top level window/button
 button = QPushButton('Exit')
-# app.exit() is a method called to terminate application for
-# whatever reason you like. Here we instruct to call this method
-# when the button is clicked
+# call app.exit() when the button is clicked ('clicked' signal fires)
 button.clicked.connect(app.exit)
-# 'clicked' is a _signal_, which we _connect_ to a method that we
-# want to be called when signal fires
 button.show()
 
-# IMPORTANT: remember to assign GUI elements to variables or they
-# will be destroyed by PySide automatically
-
 app.exec_()