Results 1 to 2 of 2

Thread: foreach QTextEdit in Layout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default foreach QTextEdit in Layout

    I dynamically added QTextEdit items in a particular layout (QGrigLayout).
    Later I want to to extract the values of each QTextEdit item and merge them into a single QString.

    Any thoughts?

    The following does not work:
    QString msg;
    QLayoutItem *item;
    foreach (item, ui->toPlainText)
    {
    msg+= item->text();
    }
    Last edited by slc; 2nd September 2010 at 00:02.

Similar Threads

  1. Replies: 6
    Last Post: 5th May 2010, 23:25
  2. lifetime of foreach
    By BalaQT in forum Newbie
    Replies: 4
    Last Post: 4th March 2010, 15:55
  3. Replies: 2
    Last Post: 6th February 2010, 16:31
  4. Adjust the initial size of a QTextEdit in a layout
    By hecinho in forum Qt Programming
    Replies: 0
    Last Post: 26th November 2009, 15:58
  5. Foreach performance
    By jano_alex_es in forum General Programming
    Replies: 2
    Last Post: 17th November 2009, 13:26

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.