Skip to content

Instantly share code, notes, and snippets.

Created January 5, 2015 08:50
Show Gist options
  • Save anonymous/21f6c6f8a5bec0451d9e to your computer and use it in GitHub Desktop.
Save anonymous/21f6c6f8a5bec0451d9e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import PySide.QtGui as QtGui
from PySide.QtGui import QApplication, QMainWindow
import sys
class TestWindow(QMainWindow):
def __init__(self):
super(TestWindow, self).__init__()
self.spinbox = QtGui.QDoubleSpinBox(self)
self.spinbox.lineEdit().returnPressed.connect(
self.test_method)
def test_method(self):
print("Return pressed")
app = QtGui.QApplication(sys.argv)
w = TestWindow()
w.show()
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment