Overview of the QtWidgets object¶
The built-in QtWidgets object creates various widgets to build user interface screens.
Core Capabilities of QtWidgets¶
Creating widgets for building user interface forms.
Methods of QtWidgets object¶
Layouts (Container)¶
| Method | Description |
|---|---|
| QtWidgets.createQGridLayout() | Creates a grid layout for placing widgets in rows and columns. |
| QtWidgets.createQFormLayout() | Creates a layout for pairs of "label - widget". |
Standard Qt Widgets¶
| Method | Description |
|---|---|
| QtWidgets.createQWidget() | Creates a base container widget. |
| QtWidgets.createQLabel() | Creates a text label (static text). |
| QtWidgets.createQLineEdit() | Creates a single-line text input field. |
| QtWidgets.createQPushButton() | Creates a button that performs an action when clicked. |
| QtWidgets.createQSpinBox() | A spin box for inputting integers with increment/decrement buttons. |
| QtWidgets.createQDoubleSpinBox() | A spin box for inputting double numbers with value-changing buttons. |
| QtWidgets.createQComboBox() | A combo box for selecting one item from a list. |
| QtWidgets.createQGroupBox() | Groups other widgets in a frame with a title. |
| QtWidgets.createQCheckBox() | A checkbox (flag) that allows selection or deselection. |
Custom Widgets¶
| Method | Description |
|---|---|
| QtWidgets.createWarningIcon() | Creates a warning icon (e.g. ⚠️). |
| QtWidgets.createExclamationIcon() | Creates an exclamation mark icon (e.g. ❗). |
| QtWidgets.createNumberEdit() | A custom widget for inputting numbers with additional logic. |
| QtWidgets.createWindingLayersComboBox() | Selects the number of winding layers. |
| QtWidgets.createWindingLayersOrientationComboBox() | Selects the orientation of winding layers. |
| QtWidgets.createWindingTypeComboBox() | Selects the type of winding. |
| QtWidgets.createStatorTypeComboBox() | Selects the type of stator. |
| QtWidgets.createRotorTypeComboBox() | Selects the type of rotor. |
| QtWidgets.createPoleArrangementComboBox() | Selects the arrangement of poles. |
| QtWidgets.createNumberSlotSpinBox() | Inputs the number of slots. |
| QtWidgets.createNumberPoleSpinBox() | Inputs the number of poles. |
| QtWidgets.createWindingConnectionComboBox() | Selects the connection scheme for winding layers. |
| QtWidgets.createWireSizeMethodComboBox() | Selects the method for calculating wire diameter. |
| QtWidgets.createWireAwgComboBox() | Selects the American gauge of wire. |
| QtWidgets.createWireSwgComboBox() | Selects the British gauge of wire. |