Results 1 to 1 of 1

Thread: qmake iterate list content

  1. #1
    Join Date
    Nov 2011
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: qmake iterate list content

    Hi how I can make a cycle on the filed of a var?

    I just check in the docs but without success

    I use a test.pri included in a test.pro but is impossible iterate a list

    Qt Code:
    1. defineTest(testforOnFiles)
    2. {
    3. message( params $$ARGS )
    4. message( params $$1 )
    5. LIST = 1 2 3
    6. for(icefile, LIST)
    7. {
    8. message(file - $${icefile})
    9. }
    10. }
    To copy to clipboard, switch view to plain text mode 

    I use QtCreator 2.3.1 for linux kubuntu 11.04


    Added after 1 15 minutes:


    Quote Originally Posted by muchasuerte View Post
    Hi how I can make a cycle on the filed of a var?

    I just check in the docs but without success

    I use a test.pri included in a test.pro but is impossible iterate a list

    Qt Code:
    1. defineTest(testforOnFiles)
    2. {
    3. message( params $$ARGS )
    4. message( params $$1 )
    5. LIST = 1 2 3
    6. for(icefile, LIST)
    7. {
    8. message(file - $${icefile})
    9. }
    10. }
    To copy to clipboard, switch view to plain text mode 

    I use QtCreator 2.3.1 for linux kubuntu 11.04
    resolved the problem is the "{" position


    now it works
    Qt Code:
    1. defineTest(testforOnFiles) {
    2. message( params $$ARGS )
    3. message( params $$1 )
    4. LIST = 1 2 3
    5. for(icefile, LIST) {
    6. message(file - $${icefile})
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by muchasuerte; 23rd November 2011 at 17:02.

Similar Threads

  1. QMake Reading content from a file in qmake
    By MarcoAlanen in forum Qt Tools
    Replies: 2
    Last Post: 27th August 2014, 07:47
  2. QNetworkAccessManager and get FTP content list
    By dickymoe in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2011, 19:37
  3. Replies: 6
    Last Post: 11th October 2010, 14:25
  4. Replies: 5
    Last Post: 30th January 2010, 10:09

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.