Results 1 to 4 of 4

Thread: Saving content of a QLineEdit

  1. #1
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    70
    Qt products
    Qt5
    Platforms
    Windows

    Default Saving content of a QLineEdit

    Hi

    There is a QLineEdit object in my project. I want after running .exe file of my project and writing some text in LineEdit, this text be saved. So after closing .exe file and opening again that, the text be showed.

    Thanks for any help.

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Saving content of a QLineEdit

    Hi,

    You can use QSettings with INI format.
    Òscar Llarch i Galán

  3. The following user says thank you to ^NyAw^ for this useful post:

    Alex22 (3rd December 2015)

  4. #3
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    70
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Saving content of a QLineEdit

    Quote Originally Posted by ^NyAw^ View Post
    Hi,

    You can use QSettings with INI format.
    Thanks for your answer NyAw,
    please give me a simple example.

  5. #4
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Saving content of a QLineEdit

    Hi,

    First take a look at documentation and then try it. If you have problems then you can provide your sample code to let us help you.
    Òscar Llarch i Galán

Similar Threads

  1. Saving values from Qlineedit and qcombobox?
    By prabhudev in forum Newbie
    Replies: 9
    Last Post: 23rd May 2012, 05:53
  2. How to go about saving?
    By TomJoad in forum Newbie
    Replies: 3
    Last Post: 5th April 2011, 23:19
  3. Replies: 1
    Last Post: 12th October 2010, 22:20
  4. Saving as XML
    By rakkar in forum Newbie
    Replies: 2
    Last Post: 30th October 2009, 17:17
  5. Saving QLabel content in a file
    By Caius Aérobus in forum Newbie
    Replies: 1
    Last Post: 29th October 2008, 17:03

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.