mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-13 23:17:09 +00:00
15 lines
370 B
QML
15 lines
370 B
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 2.2
|
|
|
|
Menu {
|
|
onOpened: {
|
|
// Give focus to the first visible and enabled menu item
|
|
for (var i = 0; i < count; i++) {
|
|
var item = itemAt(i)
|
|
if (item.visible && item.enabled) {
|
|
item.forceActiveFocus(Qt.TabFocusReason)
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|