Add annotation property panel
This commit is contained in:
@@ -153,6 +153,22 @@ class RightToolsPanel(QWidget):
|
||||
self.sections[section_id] = section
|
||||
self.sections_layout.addWidget(section)
|
||||
|
||||
def add_widget_section(self, title: str, widget: QWidget, section_id: str) -> None:
|
||||
section = QFrame()
|
||||
section.setObjectName("toolSection")
|
||||
|
||||
layout = QVBoxLayout(section)
|
||||
layout.setContentsMargins(8, 8, 8, 8)
|
||||
layout.setSpacing(6)
|
||||
|
||||
label = QLabel(title)
|
||||
label.setObjectName("toolSectionLabel")
|
||||
layout.addWidget(label)
|
||||
layout.addWidget(widget)
|
||||
|
||||
self.sections[section_id] = section
|
||||
self.sections_layout.addWidget(section)
|
||||
|
||||
def finish(self) -> None:
|
||||
self.sections_layout.addStretch(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user