-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Ideally, if a widget declares a minimum size, the dock widget it is added to would not be able to shrink beyond that size. Confusingly, the dock widget has its minimum size set based on the widget it encloses (although we may want to change that to a maximum operation when multiple tabs have minimum sizes? Not sure), so I'm not sure if I'm misunderstanding what that method does...
Here's an MCVE, adapted from #71:
from PyQt6.QtWidgets import QWidget
from pymmcore_gui import create_mmgui
from pymmcore_gui.actions import WidgetActionInfo
def create_my_widget(parent: QWidget) -> QWidget:
wdg = QWidget(parent)
wdg.setMinimumWidth(600)
wdg.setMinimumHeight(600)
wdg.setStyleSheet("background-color: lightblue;")
return wdg
WidgetActionInfo(
key="mywidget",
text="My Widget!!!!",
icon="mdi-light:format-list-bulleted",
create_widget=create_my_widget,
)
create_mmgui()tiny_widget.mp4
Metadata
Metadata
Assignees
Labels
No labels