Results 1 to 3 of 3

Thread: print text in the lineEdit control from string

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2010
    Posts
    28
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default print text in the lineEdit control from string

    hi
    this is my code:


    QSTRING text;
    QDOM DOCUMENT DOC("myfile.xml")
    qdomelement ELEMENT = DOC.DocumentElement();
    for(QDomNode n = element.firstChild();!n.isNull(); n = n.nextSibling())
    {
    if(n= "PLCNO")
    {
    QDomText t = n.toText();
    if (!t.isNull())
    text = t.data();
    plcno->text = text
    }

    if(n= "PLCName")
    {
    QDomText t = n.toText();
    if (!t.isNull())
    text = t.data();
    plcname->text = text //(Converting string to text)
    }

    }

    here i want to print the text(string value) in the Lineeditcontrol(plcno and plcname),

    [plcno->text = text]
    is this correct way to print the text from string? or ui->plcno->text()=text

    if(n= "PLCName")
    is this correct way to check the condition?
    Last edited by rk0747; 6th February 2010 at 03:12.

Similar Threads

  1. how to print string??
    By pratik in forum Qt Programming
    Replies: 7
    Last Post: 25th December 2010, 16:38
  2. Get text from dynamic lineedit
    By wirasto in forum Qt Programming
    Replies: 1
    Last Post: 13th January 2010, 18:56
  3. 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
  4. Enabling buttons when lineEdit has text
    By k12yp70n in forum Newbie
    Replies: 4
    Last Post: 29th May 2009, 07:18
  5. Lineedit text change signal
    By zgulser in forum Qt Tools
    Replies: 2
    Last Post: 19th January 2009, 13:38

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.