Description
Creates a button with text.
Syntax
JSQtWidgets.createQPushButton(text: String, parent: widget = null) -> QPushButton
Parameters
Parameter |
Type |
Default Value |
Mandatory |
Description |
text |
String |
— |
Yes |
The text on the button. |
parent |
widget |
null |
❌ No |
The parent widget to which the created QPushButton belongs. If not specified, the created button is created without a parent. |
Return value
Type |
Description |
Button |
A new QPushButton object. |
Example
JS |
---|
| let result = QtWidgets.createQPushButton(parent)
console.info(result)
|
Last update: 14 August 2025, 18:47