0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

docs: updated docs for v2 (#531)

This commit is contained in:
2025-04-24 17:37:10 +02:00
parent 25bd905cef
commit b4af2cc77a
13 changed files with 105 additions and 77 deletions

View File

@ -27,12 +27,12 @@ from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget
from bec_widgets.widgets.toggle_switch import ToggleSwitch
class MyGui(QWidget):
def __init__(self):
super().__init__()
def __init__(self, parent=None):
super().__init__(parent=parent)
self.setLayout(QVBoxLayout(self)) # Initialize the layout for the widget
# Create and add the ToggleSwitch to the layout
self.toggle_switch = ToggleSwitch()
self.toggle_switch = ToggleSwitch(parent=self)
self.layout().addWidget(self.toggle_switch)
# Example of how this custom GUI might be used: