Results 1 to 4 of 4

Thread: QXmlQuery::evaluateTo(QString) adds a line break

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default QXmlQuery::evaluateTo(QString) adds a line break

    I noticed that QXmlQuery always adds an extra line break to the returned value (when evaluating to QString)
    Qt Code:
    1. QXmlQuery q;
    2. q.setQuery("'aaa'");
    3. if (q.isValid() && q.evaluateTo(&s))
    4. {
    5. s.append("b");
    6. qDebug()<<s<<endl;
    7. }
    To copy to clipboard, switch view to plain text mode 
    The code above produces strange output:
    Qt Code:
    1. "aaa
    2. b"
    To copy to clipboard, switch view to plain text mode 
    instead of expected "aaab".

    Is that a bug or am I doing something wrong?

  2. The following user says thank you to mentalmushroom for this useful post:

    azalea (5th June 2018)

Similar Threads

  1. [ANN] ODB C++ ORM adds support for Qt
    By borisk in forum Qt Programming
    Replies: 0
    Last Post: 28th April 2011, 12:08
  2. PyQT QwtScaleDiv adds ticks to axis
    By mbernasocchi in forum Qwt
    Replies: 12
    Last Post: 13th April 2011, 11:29
  3. Converting QString to char* in onl line
    By hubbobubbo in forum Qt Programming
    Replies: 10
    Last Post: 11th December 2009, 11:45
  4. Replies: 3
    Last Post: 1st October 2009, 23:19
  5. Possible to execute QXmlQuery on a QString?
    By chadkeck in forum Qt Programming
    Replies: 3
    Last Post: 8th October 2008, 17:24

Tags for this Thread

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.