Results 1 to 5 of 5

Thread: Looking to use a LineEdit with a pushbutton to output to a graphicsview box

  1. #1
    Join Date
    Mar 2011
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Looking to use a LineEdit with a pushbutton to output to a graphicsview box

    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
    Attached Files Attached Files

  2. The following user says thank you to sully316 for this useful post:

    sibercekirge (24th March 2011)

  3. #2
    Join Date
    Mar 2011
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Looking to use a LineEdit with a pushbutton to output to a graphicsview box

    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

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Looking to use a LineEdit with a pushbutton to output to a graphicsview box

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #4
    Join Date
    Mar 2011
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Looking to use a LineEdit with a pushbutton to output to a graphicsview box

    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.

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Looking to use a LineEdit with a pushbutton to output to a graphicsview box

    Hmm? What's wrong with QLineEdit::value ?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 8
    Last Post: 27th September 2010, 14:10
  2. Spellchecking in lineedit
    By mkas in forum Newbie
    Replies: 0
    Last Post: 27th August 2010, 11:54
  3. LineEdit.
    By Rewo in forum Newbie
    Replies: 17
    Last Post: 2nd July 2010, 09:37
  4. How to send the output(say average) to a lineEdit?
    By enthudrives in forum Qt Programming
    Replies: 2
    Last Post: 15th June 2010, 12:21
  5. Slots in LineEdit
    By Misko in forum Newbie
    Replies: 3
    Last Post: 28th July 2007, 13:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.