Results 1 to 10 of 10

Thread: How to take user input in lineEdit and write that to file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to take user input in lineEdit and write that to file

    This is a generic project with the addition of a single slot in mainwindow.cpp. It demonstrates how to find a "correct" place to save user files, how to access the text of a line edit or text edit, and how to put that text in a file.

    untitled.zip
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  2. #2
    Join Date
    Nov 2012
    Posts
    47
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: How to take user input in lineEdit and write that to file

    From the code you posted on #1

    You need to add the ui header to your mywrite.h file
    #include <ui_mywrite.h>

    *and also stream << ui->textEdit......

Similar Threads

  1. hoe to write user input data into QTcpserver port
    By gauravg in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2012, 05:47
  2. How to input Chinese characters in LineEdit or TextEdit ?
    By behlkush in forum Qt Programming
    Replies: 2
    Last Post: 23rd May 2011, 12:26
  3. User Input using QString
    By kumarpraveen in forum Newbie
    Replies: 4
    Last Post: 9th July 2010, 07:49
  4. LineEdit for Hexadecimal input
    By mastupristi in forum Qt Programming
    Replies: 2
    Last Post: 21st January 2010, 14:51
  5. read and write content of lineedit widget in Other Form
    By validator in forum Qt Programming
    Replies: 1
    Last Post: 25th April 2008, 15:07

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
  •  
Qt is a trademark of The Qt Company.