From 21adbec8d8c05533c3723a90b8356effabc62b15 Mon Sep 17 00:00:00 2001 From: Joris Date: Fri, 12 Jun 2020 08:14:39 +0200 Subject: Remove warning in task form --- todo/gui/tasks/form/widget.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/todo/gui/tasks/form/widget.py b/todo/gui/tasks/form/widget.py index 5950a93..a6ce488 100644 --- a/todo/gui/tasks/form/widget.py +++ b/todo/gui/tasks/form/widget.py @@ -104,10 +104,8 @@ def name_edit( default_value: str) -> QtWidgets.QLineEdit: widget = QtWidgets.QWidget(parent) - layout.addWidget(widget) - inner_layout = QtWidgets.QVBoxLayout(widget) - widget.setLayout(layout) + widget.setLayout(inner_layout) label = QtWidgets.QLabel(label, parent) inner_layout.addWidget(label) @@ -117,6 +115,8 @@ def name_edit( edit.setText(default_value) inner_layout.addWidget(edit) + layout.addWidget(widget) + return edit def line_edit( -- cgit v1.2.3