Results 1 to 7 of 7

Thread: how to get text from line edit after user clicks the submit button

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2018
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default how to get text from line edit after user clicks the submit button

    i have window with a label and a push button. When user clicks the button it takes them to another window with a line edit and a submit button.Now i want the text which user typed to replace the text of label in my first window.
    ]i have successfully made the program except that when user types the text in line edit no matter what the text of label is changed to blank(that is no text). I know this is because QString which i am using to set label of the text is initialized to null and as soon as the new window is created a null initialized QString is set to the text of label. I am aware of the fact that i need to use signals and slots but just couldn't figure out what to connect and to what?

    please if possible try to give code example

    any help will be seriously appreciated.
    Attached Images Attached Images

Similar Threads

  1. QTableView line edit clears the text on edit
    By PlasticJesus in forum Qt Programming
    Replies: 5
    Last Post: 14th March 2015, 20:06
  2. button to save line edit text to file
    By davidrhcp in forum Newbie
    Replies: 6
    Last Post: 7th May 2014, 11:41
  3. Clear button in line edit
    By MTK358 in forum Qt Programming
    Replies: 3
    Last Post: 1st August 2010, 14:27
  4. clear button for line edit
    By jayreddy in forum Qt Programming
    Replies: 6
    Last Post: 3rd December 2009, 05:36
  5. Line edit and push button
    By dela in forum Newbie
    Replies: 1
    Last Post: 10th December 2008, 17:10

Tags for this Thread

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.