Hi. from the image. i would like to link the Combox with the lineEdit. as in i select End device 1, only the things in end device 1 would be change to whatever i type in the lineEdit. can anyone give me some example of code about doing it?
Hi. from the image. i would like to link the Combox with the lineEdit. as in i select End device 1, only the things in end device 1 would be change to whatever i type in the lineEdit. can anyone give me some example of code about doing it?
connect the singnal of combobox activated() to some slot in your dialog and play with lineedit
i know the connect part. but how about the play part?
i have attach an image what..
why cant you rephrase your question?
do you whant to change the text in combobox to whatever u type in lineedit?
EDIT..
i still cant understat what is qTemp?
nope. okay i roughly explain what i am doing and what i want. first for the image there is a yellow node. they will be 8 of them. so my combobox i already set it to 8 choice. from "End Device 1 to 8"
so now lets say when i select End device 1 on my combobox, and a type a certain word in the lineEdit. when i press ok. the word in the line edit will appear on the yellow node.
nvm just know it as printf.i still cant understat what is qTemp?
do it like this..
Qt Code:
//main MyDialog dlg; { int deviceId = dlg.getDeviceId(); if(!word.isEmpty()) putWordInUse(word); ..... ... } //MyDialog int MyDialog::getDeviceId() { return combobox->currentIndex()+1;//0+1=end device 1 ,1+1..... } int MyDialog::getWord() { return lineEdit->text(); }To copy to clipboard, switch view to plain text mode
do not forget to connect the ok button to accept() slot of QDialog
i dun think this will work with my current code. argh talking in forum is pretty hard man. i cant possible post my whole source code here.
do you have a msn or something? so i could end you my whole program. and u help me take a look?
sorry man .. this is the best i can do...
oh man. i seriously need some help here. anybody?
Bookmarks