Created
January 5, 2015 08:50
-
-
Save anonymous/21f6c6f8a5bec0451d9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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