Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    How to define a StringList (QStringList)

    QML and Qt Quick
    2
    2
    2583
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pascal95abc last edited by

      Hello.

      How can I create a Stringlist in a Qt Quick Application ?

      @
      property int xx:0 // this works
      property int yy: 0 // this too

      property qstringlist sl1: nil   // error
      

      @

      How can I create a StringList, it should not be seen be the user, just a variable with data and the ability to add lines.

      Thanks

      Qt 4.7.3
      Symbian OS v9.4 / Symbian^1, S60 5th Edition
      on N97

      1 Reply Last reply Reply Quote 0
      • D
        dmcr last edited by

        qstringList is not a qml type.

        If you want to use one only with qml, use javascript array, or from Cpp using setContextProperty(... and then you can use it with the model of a hidden ListView, for example.

        dmcr

        1 Reply Last reply Reply Quote 0
        • First post
          Last post