Skip to content
Snippets Groups Projects
Commit e0434e4d authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[widget] connected dataChanged signal and refactored code using QLineEdit's textChanged function

parent 6f7e30fc
No related branches found
No related tags found
1 merge request!55Reusable widget short description
......@@ -33,7 +33,7 @@ from PyQt5.QtWidgets import QFormLayout
class DescriptionWidget(QWidget):
"""Class representing the short description of a beat object"""
data_changed = pyqtSignal()
dataChanged = pyqtSignal()
def __init__(self, parent=None):
"""Constructor"""
......@@ -45,13 +45,9 @@ class DescriptionWidget(QWidget):
layout = QFormLayout(self)
layout.addRow(self.tr("Short Description:"), self.form_description)
@property
self.form_description.textChanged.connect(self.dataChanged)
def short_description(self):
"""Short description property"""
"""Short description text"""
return self.form_description.text()
@short_description.setter
def short_description(self, name):
self.form_description.setText(name)
self.data_changed.emit()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment