Results 1 to 7 of 7

Thread: How to detect new line?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Kranj, Slovenia
    Posts
    34
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to detect new line?

    This is the error the compiler is giving me after i had put in the document the sugested code... What went wrong?

    glavni.cpp:449:34: macro "Q_FOREACH" requires 2 arguments, but only 1 given
    glavni.cpp: In member function `void okno:n_o_t_izpis_clicked()':
    glavni.cpp:449: error: `Q_FOREACH' undeclared (first use this function)
    glavni.cpp:449: error: (Each undeclared identifier is reported only once for eac
    h function it appears in.)
    glavni.cpp:449: error: expected `;' before '{' token
    Tnx!
    Luka

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to detect new line?

    Quote Originally Posted by whoops.slo
    What went wrong?
    There should be "," instead of ";":
    Qt Code:
    1. foreach( QString line, lines ) {
    2. // ...
    3. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Kranj, Slovenia
    Posts
    34
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to detect new line?

    Tnx for your help everyone! It is working now!

    Regards;
    Luka

Similar Threads

  1. QTcpSocket exception.
    By Fastman in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2008, 13:51
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42

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.