Skip to content

Commit

Permalink
fix(ComboBox): Cannot read property 'width' of null
Browse files Browse the repository at this point in the history
ComboBox.qml:32:9: TypeError: Cannot read property 'width' of null
  • Loading branch information
kegechen committed Sep 6, 2024
1 parent 8cb5678 commit df6806e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qt6/src/qml/ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ T.ComboBox {

delegate: MenuItem {
useIndicatorPadding: true
width: parent.width
width: control.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
icon.name: (control.iconNameRole && model[control.iconNameRole] !== undefined) ? model[control.iconNameRole] : null
highlighted: control.highlightedIndex === index
Expand Down

0 comments on commit df6806e

Please sign in to comment.