-
-
Save quazgar/7b72b08f069a1ecf0ce2 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) | |
self.spinbox.lineEdit().editingFinished.connect( | |
self.test_finished) | |
def test_method(self): | |
print("Return pressed.") | |
def test_finished(self): | |
print("Editing finished.") | |
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