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:
@ -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:
|
||||
|
Reference in New Issue
Block a user