Text Masking in TextField
-
Without key event can i do passwordmaskdelay for Text? and Is there chance of generating key event without using keyboard keys manually???
I tried by using passwordmaskdelay property ,it is not working for my code because i'm using the customized button.TextField { id: inputtext color: "red" width:300;height:100 anchors.centerIn: parent echoMode: TextInput.Password passwordMaskDelay: 3000 horizontalAlignment: TextInput.Center } Button{ id:btn height:100 width: 100 text: "1" onClicked:{ console.log("button clicked = "+btn.text) inputtext.text+=btn.text } }
-
use
insert
function ofTextField
import QtQuick 2.12 import QtQuick.Controls 2.14 Rectangle { anchors.fill: parent; //I added this button TextField { id: inputtext color: "red" width:300;height:100 anchors.centerIn: parent echoMode: TextInput.Password passwordMaskDelay: 3000 horizontalAlignment: TextInput.Center } Button { id:btn height:100 width: 100 text: "1" onClicked: { console.log("button clicked = "+btn.text) inputtext.insert(inputtext.length ,btn.text) } } }
-
use
insert
function ofTextField
import QtQuick 2.12 import QtQuick.Controls 2.14 Rectangle { anchors.fill: parent; //I added this button TextField { id: inputtext color: "red" width:300;height:100 anchors.centerIn: parent echoMode: TextInput.Password passwordMaskDelay: 3000 horizontalAlignment: TextInput.Center } Button { id:btn height:100 width: 100 text: "1" onClicked: { console.log("button clicked = "+btn.text) inputtext.insert(inputtext.length ,btn.text) } } }
@NYBL Thanks for the information