Skip to content

Commit

Permalink
UserStatusSelector: set focusPolicy on accept button
Browse files Browse the repository at this point in the history
otherwise the status text won't be set on macOS as the text box never
loses its focus

`Qt.StrongFocus` is the default focusPolicy on all platforms except for
macOS, there it's `Qt.TabFocus`

the other buttons of the UserStatusSelector don't need that focusPolicy
as they do not modify the model from values in the view

see also:
- https://bugreports.qt.io/browse/QTBUG-110295
- https://codebrowser.dev/qt6/qtdeclarative/src/quicktemplates/qquickabstractbutton.cpp.html#_ZN27QQuickAbstractButtonPrivate4initEv

Signed-off-by: Jyrki Gadinger <[email protected]>
  • Loading branch information
nilsding committed Feb 21, 2025
1 parent e4f5ed4 commit d7c5cc3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/UserStatusSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ ColumnLayout {
Layout.fillHeight: true
primary: true
colored: true
focusPolicy: Qt.StrongFocus
text: qsTr("Set status message")
onClicked: userStatusSelectorModel.setUserStatus()
}
Expand Down

0 comments on commit d7c5cc3

Please sign in to comment.