signal nextCompleter();
signal prevCompleter();
+ signal isFocused();
+ signal checkFocus();
+
function setText(string) { textInLineEdit = string; }
function setCompleter(string) { completerItemText.text=string; }
function hideCompleter() { completerItem.visible=false; }
completerItemText.text="";
}
+ function setFocus(){
+ if(rectangle1.enabled){
+ text_input1.focus=true;
+ isFocused();
+ }
+ }
+
TextInput {
id: text_input1
width: rectangle1.width-20
else
completerItem.visible=false;
}
- focus: rectangle1.focus;
Keys.priority : Keys.AfterItem
Keys.onPressed: {
if ((event.key == Qt.Key_Enter) || (event.key == Qt.Key_Return)){
}
}
onTextChanged: rectangle1.textChange(text);
+ onFocusChanged: if(focus) isFocused();
+ onActiveFocusChanged: rectangle1.checkFocus();
}
states: [
State {
- name: "FokusState"; when: text_input1.focus==true && rectangle1.enabled==true;
+ name: "FokusState"; when: text_input1.focus && rectangle1.enabled;
PropertyChanges {
target: rectangle1
border.width: 3
}
},
State {
- name: "DisableState"; when: rectangle1.enabled==false;
+ name: "DisableState"; when: !rectangle1.enabled;
PropertyChanges { target: shadeDisable; z: 3; opacity: 0.5 }
}
]