Results 1 to 2 of 2

Thread: Get text from dynamic lineedit

  1. #1
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question Get text from dynamic lineedit

    I create 5 lineedit like this. But I don't know how to get text from every line edit.

    Qt Code:
    1. .......
    2. ........
    3. for (int i=0; i <5; ++i)
    4. {
    5. QLineEdit *le=new QLineEdit(this);
    6. grid->addWidget(le, i, 0);
    7. }
    8.  
    9. QPushButton *tombol=new QPushButton(tr("Save"));
    10. connect(tombol, SIGNAL(clicked()), this, SLOT(simpan()));
    11. }
    12.  
    13. void Formulir::simpan()
    14. {
    15. //qDebug() << ...
    16. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    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: Get text from dynamic lineedit

    Store pointers to those widgets somewhere.
    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. How to enabled button, when i changed lineedit`s text ?
    By newermind in forum Qt Programming
    Replies: 8
    Last Post: 13th August 2009, 08:57
  2. Enabling buttons when lineEdit has text
    By k12yp70n in forum Newbie
    Replies: 4
    Last Post: 29th May 2009, 07:18
  3. How to do internationalization of dynamic text?
    By montylee in forum Qt Programming
    Replies: 8
    Last Post: 17th April 2009, 22:00
  4. Lineedit text change signal
    By zgulser in forum Qt Tools
    Replies: 2
    Last Post: 19th January 2009, 13:38
  5. dynamic text?
    By vonCZ in forum Newbie
    Replies: 2
    Last Post: 20th June 2007, 11:41

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.