QML TextEdit: issues while writing
-
can anyone explain to me the reason why this textedit does not write (when keys are pressed) please?
@
TextEdit
{
readOnly: false
text: testoManifesto
anchors.centerIn: parent
id: txtEdit
font.pointSize: 16
Keys.onBackPressed: if(txtEdit.text == "") txtEdit.text = "Scrivi ciò che ti interessa cercare!"; else txtEdit.text = txtEdit.text
Keys.onPressed: if(txtEdit.text == "Scrivi ciò che ti interessa cercare!") txtEdit.text = ""; else txtEdit.text = txtEdit.text
}MouseArea { anchors.fill: parent hoverEnabled: true onEntered: { parent.border.color = "green"; testo_aiuto = guida } onExited: { parent.border.color = "red"; testo_aiuto = guidaDefault } onClicked: { if(readOnly) listElementClicked(funzione, txtEdit.text) else //www o internet if(txtEdit.text.search(funzione)) { txtEdit.text = "Scrivi ciò che ti interessa cercare!" txtEdit.width = 350 txtEdit.height = 30 txtEdit.cursorVisible = true txtEdit.focus = true; } else listElementClicked(funzione, txtEdit.text) } }
@
-
I have no idea what you mean. I cannot modify your code for you directly, no. There are only a few things which could be stopping input events from reaching your TextEdit, however, which I described in my first reply. Hopefully careful analysis of your code will tell you what is intercepting the events.
Cheers,
Chris.