PySide6.QtDesigner.QPyDesignerCustomWidgetCollection¶
- class QPyDesignerCustomWidgetCollection¶
- Synopsis¶- Methods¶- Detailed Description¶- The - QPyDesignerCustomWidgetCollectionimplements QDesignerCustomWidgetCollectionInterface and provides static helper functions for registering custom widgets by type or by implementing QDesignerCustomWidgetInterface .- The usage is explained in Custom Widgets in Qt Widgets Designer. - static registerCustomWidget(type[, xml=""[, tool_tip=""[, icon=""[, group=""[container=False]]]]])¶
- Parameters:
- xml (str) – A snippet of XML code in - .uiformat that specifies how the widget is created and sets initial property values.
- tool_tip (str) – Tool tip to be shown in the widget box. 
- icon (str) – Path to an icon file be shown in the widget box. 
- group (str) – Category for grouping widgets in the widget box. 
- module (str) – Module name for generating the import code by uic . 
- container (bool) – Indicates whether the widget is a container like QGroupBox, that is, child widgets can be placed on it. 
 
 - Registers an instance of a Python-implemented QWidget by type with Qt Widgets Designer. - The optional keyword arguments correspond to the getters of QDesignerCustomWidgetInterface : - See also 
 - static addCustomWidget(custom_widget)¶
- Parameters:
- custom_widget (QDesignerCustomWidgetInterface) – Custom widget instance 
 - Adds a custom widget (implementation of QDesignerCustomWidgetInterface) with Qt Widgets Designer.