QML TextEdit: issues while writing
-
wrote on 6 Aug 2012, 10:07 last edited by
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) } }
@
-
wrote on 7 Aug 2012, 00:10 last edited by
It depends on the rest of the code in your application. Does anything else grab focus? Does something higher accept various keypress events, stopping them from being delivered to your TextEdit?
-
wrote on 7 Aug 2012, 14:45 last edited by
can you please control the code in my website?
EDIT: the name of the project is "Tecnophobie" and you can find it in "Programmazione"->"Computer". thank you a lot
-
wrote on 8 Aug 2012, 11:58 last edited by
Please, admin, make that when a user edits a post, all the followers receive an e-mail notification. Now that you have read what i suggest, you can delete this post! =)
-
wrote on 9 Aug 2012, 00:00 last edited by
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. -
wrote on 9 Aug 2012, 08:55 last edited by
Hi Chris. I know you cannot modify my code.
But nothing does catch signal from keyboard in the rest of the code. I will try to solve this issue :)
1/6