fix warnings when ToolButton has no parent
This commit is contained in:
parent
2c6d44eb23
commit
48e385a7c2
@ -164,7 +164,7 @@ Item {
|
||||
property QtObject margins: item.margins
|
||||
property string shadowState: "shadow"
|
||||
sourceComponent: {
|
||||
if (label.text.length == 0 && button.width == button.height && button.parent.checkedButton === undefined && !flat) {
|
||||
if (label.text.length == 0 && button.width == button.height && (button.parent && button.parent.checkedButton === undefined) && !flat) {
|
||||
return roundButtonComponent
|
||||
} else {
|
||||
return buttonComponent
|
||||
|
Loading…
Reference in New Issue
Block a user