mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-03 12:16:51 +02:00
* use it in MetadataListView and GraphEditor 'add Node' menu * GraphEditor: forward MenuItem key events to searchBar to be able to continue editing the filter even if it lost active focus
41 lines
733 B
QML
41 lines
733 B
QML
import QtQuick 2.9
|
|
import QtQuick.Controls 2.3
|
|
import QtQuick.Layouts 1.3
|
|
import MaterialIcons 2.2
|
|
|
|
|
|
/**
|
|
* Basic SearchBar component with an appropriate icon and a TextField.
|
|
*/
|
|
FocusScope {
|
|
property alias textField: field
|
|
property alias text: field.text
|
|
|
|
implicitHeight: childrenRect.height
|
|
Keys.forwardTo: [field]
|
|
|
|
function forceActiveFocus() {
|
|
field.forceActiveFocus()
|
|
}
|
|
|
|
function clear() {
|
|
field.clear()
|
|
}
|
|
|
|
RowLayout {
|
|
width: parent.width
|
|
|
|
MaterialLabel {
|
|
text: MaterialIcons.search
|
|
}
|
|
|
|
TextField {
|
|
id: field
|
|
focus: true
|
|
Layout.fillWidth: true
|
|
selectByMouse: true
|
|
}
|
|
}
|
|
}
|
|
|
|
|