qt connect a signal to a class function
Hi All,
first let me say I'm an embedded programmer who as to do some work on a gui to connect a device. I've been asked to do it in QT. This is my first day working in QT so I'm unfamiliar with the correct wording so hope this explains. I've done some googling but am unable to find and answer, there seems to be a host of documents, but I really can't find an answer :s
So, I produced a basic gui in designer on linux/ubuntu. I've added a couple of labels and line edits, so I can fill line edit, eg name and version. All works OK.
I then added a cpp/h/class files called example, the class contains a sdt::string name and version. I've added a signal pointing to the line edits for name and version, that on pressing return do a slot. However the slots give me lots of options clear() repaint() ect. I can see they work, eg use clear() and hit return the name I've typed vanishes ect. However I want the signal to point to the class I produced and fill in the name version strings when return is pressed. So basically when I type in the box and hit return my own class string variable is populated with the name I've typed in.
Sorry I'm really brand new to QT and am unsure if my language / terms are correct, so its rather hard to explain.
Thanks for the help
Last edited by knobby67; 11-08-2013 at 11:53 AM.
|