Results 1 to 2 of 2

Thread: Putting text from QList to QLineEdit problem

  1. #1
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default Putting text from QList to QLineEdit problem

    So I have this:
    Qt Code:
    1. list << ui->dox_name->text() << ui->dox_victim_age->text() << ui->dox_whore_age->text()
    2. << ui->dox_location->text() << ui->dox_IP->text() << ui->dox_fb->text();
    3. ui->text->setPlainText(list[0]);
    4.  
    5. //Where: "list" is QList<QString> and "dox_name" is a QLineEdit.
    To copy to clipboard, switch view to plain text mode 

    It work fine the first time,however if I want to update the "list" in runtime,the plaintext won't change.
    Why?

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Putting text from QList to QLineEdit problem

    this is the code where list is updated? did you forgot to call list.clear() before filling the list again?

Similar Threads

  1. QLineEdit text not retrieved
    By trojansmith1990 in forum Newbie
    Replies: 8
    Last Post: 17th May 2011, 22:02
  2. Replies: 4
    Last Post: 20th August 2010, 14:54
  3. I cannot get the string from QLineEdit->text()!
    By MIH1406 in forum Qt Programming
    Replies: 0
    Last Post: 3rd June 2010, 12:26
  4. QLineEdit text orientation
    By emrares in forum Qt Programming
    Replies: 7
    Last Post: 15th September 2009, 07:25
  5. Setting the text of a QLineEdit
    By td in forum Newbie
    Replies: 2
    Last Post: 11th September 2008, 12: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.