PDA

View Full Version : textinput1 equal to textinput2 or either way



shinichi7
15th January 2013, 17:27
i can't work this out... help please

i'm working with cryptogram, i can change char equal to text_input using state, but i can't do it in either way...


State {
name: "txtQ"; when: text_input1.text = text_input1.text
PropertyChanges { target: text_input2; text: text_input1.text}
PropertyChanges { target: text_input3; text: text_input1.text }
PropertyChanges { target: text_input4; text: text_input1.text }
}

if i change text_input2.text... other textinput must change too... any help please.. i'm stuck in here

wysota
15th January 2013, 20:47
This code doesn't make any sense. What are you trying to do?

shinichi7
16th January 2013, 01:05
a cryptogram code, yeah it doesnt make sense, i can only use that once..

example: 4 textInput
if i change 1st textinput, the other will change too same as 1st textinput, now they all have the same value but i can change any of the textinput and will update the other textinput as well... how will i work on that?

wysota
16th January 2013, 09:46
You mean you want to have 4 text inputs that always contain the same text?


function updateText(text) {
t1.text = text
t2.text = text
// ...
}

TextInput {
id: t1
onTextChanged: updateText(text)
}

TextInput {
id: t2
onTextChanged: updateText(text)
}

// ...

shinichi7
16th January 2013, 10:41
Oh God... Thank you so much this one works like a charm... you saved part of my thesis... hope you still help me for more questions... day after tomorrow is my defense ;)

wysota
16th January 2013, 10:43
day after tomorrow is my defense ;)
I see you're trying to improve your project and thesis up to the last possible moment ;)

shinichi7
21st January 2013, 09:20
I see you're trying to improve your project and thesis up to the last possible moment ;)

our defense day moved... still more time to improve. I included you in my credit page "thanks to: wysota of qtcentre.org" ;) hehe expect more questions to come from me in newbie page :rolleyes:

wysota
21st January 2013, 10:28
I included you in my credit page "thanks to: wysota of qtcentre.org" ;)

Ouch... thanks :)


expect more questions to come from me in newbie page :rolleyes:

Ouch... :]