anatoly techtonik  committed 19be1de call color selection dialog (QColorDialog)

  • Participants
  • Parent commits b61e590
  • Branches default

Comments (0)

Files changed (1)


 # Absolutely minimal example of PySide application with button calling dialog
-from PySide.QtGui import QApplication, QPushButton
+from PySide.QtGui import QApplication, QPushButton, QColorDialog
+def choose_color():
+    color  = QColorDialog().getColor()
+    print color
 app = QApplication([])
 # Create top level window/button
-button = QPushButton('Exit')
-# call app.exit() when the button is clicked ('clicked' signal fires)
+button = QPushButton('Choose Color')
+# Call function that invokes color selection dialog when the button is clicked