Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to define a StringList (QStringList)
Forum Update on Monday, May 27th 2025

How to define a StringList (QStringList)

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.8k Views
  • 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 Offline
    P Offline
    pascal95abc
    wrote on 26 Feb 2012, 20:20 last edited by
    #1

    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
    0
    • D Offline
      D Offline
      dmcr
      wrote on 28 Feb 2012, 08:17 last edited by
      #2

      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
      0

      1/2

      26 Feb 2012, 20:20

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved