PDA

View Full Version : Looking to use a LineEdit with a pushbutton to output to a graphicsview box



sully316
3rd March 2011, 17:40
Hi I am very new to Qt and I am looking for some help on a matter. I have some buttons which output text to a graphics view no problem.
The next thing I want to do is input text/numbers to one or two Line Edit box, then pass that to a button which will then pass that to a graphics view. I am using slots 1 to 4 to display to the graphics view.

Thanks for any help

sully316
4th March 2011, 10:41
Can anybody help. I need to pass a variable from QLineEdit to a Qgraphicsview by pressing a button. Any ideas or where I can het help/tutorial/example on this.

Thanks

wysota
4th March 2011, 10:56
What exactly are you having problems with? The problem seems trivial - connect a custom slot to the button's clicked() signal and call a method on the graphics view passing it the value of your line edit.

sully316
4th March 2011, 15:15
Was having difficulty getting the output to come on the graphicsview but figured it out I think.
Sorry about that I am very new to this

One thing really when you enter text/numbers into a lineedit is there a set variable name or do you make your own?. I can output fine just curious.

wysota
4th March 2011, 16:15
Hmm? What's wrong with QLineEdit::value ?